@Override
  public void initialize(String name, CaseInsensitiveStringMap options) {
    this.name = name;
    Map<String, String> properties = Maps.newHashMap(options);
    String uri = options.get(SparkUnifiedCatalogProperties.URI);
    properties.remove(SparkUnifiedCatalogProperties.URI);
    if (StringUtils.isNotEmpty(uri)) {
      AmsThriftUrl catalogUri = AmsThriftUrl.parse(uri, Constants.THRIFT_TABLE_SERVICE_NAME);
      String registerCatalogName = catalogUri.catalogName();

      if (StringUtils.isBlank(registerCatalogName)) {
        registerCatalogName = name;
        if (CatalogManager.SESSION_CATALOG_NAME().equalsIgnoreCase(registerCatalogName)) {
          LOG.warn(
              "Catalog name is not exists in catalog uri, using spark catalog as register catalog name, but "
                  + "current name "
                  + registerCatalogName
                  + " is spark session catalog name.");
        }
      }

      this.unifiedCatalog =
          UnifiedCatalogLoader.loadUnifiedCatalog(
              catalogUri.serverUrl(), registerCatalogName, properties);
    } else {
      String metastoreType = properties.get(ICEBERG_CATALOG_TYPE);
      Preconditions.checkArgument(
          StringUtils.isNotEmpty(metastoreType),
          "Lack required property: type when initializing unified spark catalog");
      Configuration localConfiguration =
          SparkUtil.hadoopConfCatalogOverrides(SparkSession.active(), name);
      TableMetaStore tableMetaStore =
          TableMetaStore.builder().withConfiguration(localConfiguration).build();
      this.unifiedCatalog =
          new CommonUnifiedCatalog(name, metastoreType, properties, tableMetaStore);
    }
    ServiceLoader<SparkTableFormat> sparkTableFormats = ServiceLoader.load(SparkTableFormat.class);
    for (SparkTableFormat format : sparkTableFormats) {
      tableFormats.put(format.format(), format);
    }
  }
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