private TableCatalog initializeTableCatalog(TableFormat format) {
    String catalogOptions = format.name().toLowerCase().replace("_", "-") + ".spark-catalog-impl";
    String impl = unifiedCatalog.properties().get(catalogOptions);
    if (StringUtils.isBlank(impl)) {
      impl = defaultTableCatalogImplMap.get(format);
    }
    if (StringUtils.isBlank(impl)) {
      throw new IllegalStateException(
          "Failed to initialize spark TableCatalog for format:" + format.name());
    }
    ServiceLoader<FormatCatalogFactory> loader = ServiceLoader.load(FormatCatalogFactory.class);
    FormatCatalogFactory formatCatalogFactory = null;
    for (FormatCatalogFactory factory : loader) {
      if (factory.format() == format) {
        formatCatalogFactory = factory;
        break;
      }
    }
    if (formatCatalogFactory == null) {
      throw new IllegalStateException("Can't find format factory for: " + format.name());
    }

    try {
      Class<?> catalogClass = Utils.getContextOrSparkClassLoader().loadClass(impl);
      if (!TableCatalog.class.isAssignableFrom(catalogClass)) {
        throw new IllegalStateException(
            "Plugin class["
                + catalogClass.getName()
                + "] for format: "
                + format.name()
                + " does not  implement TableCatalog");
      }
      TableCatalog tableCatalog =
          (TableCatalog) catalogClass.getDeclaredConstructor().newInstance();
      Map<String, String> tableCatalogInitializeProperties =
          formatCatalogFactory.convertCatalogProperties(
              unifiedCatalog.name(), unifiedCatalog.metastoreType(), unifiedCatalog.properties());

      if (tableCatalog instanceof SupportAuthentication) {
        ((SupportAuthentication) tableCatalog)
            .setAuthenticationContext(unifiedCatalog.authenticationContext());
        tableCatalogInitializeProperties.put(CATALOG_REGISTER_NAME, unifiedCatalog.name());
      }
      tableCatalog.initialize(name, new CaseInsensitiveStringMap(tableCatalogInitializeProperties));
      return tableCatalog;
    } catch (ClassNotFoundException e) {
      throw new IllegalStateException("Cannot find catalog plugin class for format: " + format, e);
    } catch (InvocationTargetException | InstantiationException | IllegalAccessException e) {
      throw new IllegalStateException(
          "Failed to invoke public no-arg constructor for format: " + format.name() + " : " + impl,
          e);
    } catch (NoSuchMethodException e) {
      throw new IllegalStateException(
          "Failed to find public no-arg constructor for format: " + format.name() + " : " + impl,
          e);
    }
  }
Unified catalog implement for spark engine.
amoro-format-mixed/amoro-mixed-spark/amoro-mixed-spark-3-common/src/main/java/org/apache/amoro/spark/SparkUnifiedCatalogBase.java