public static ServerCatalog buildServerCatalog(
      CatalogMeta catalogMeta, Configurations serverConfiguration) {
    String type = catalogMeta.getCatalogType();
    Set<TableFormat> tableFormats = CatalogUtil.tableFormats(catalogMeta);

    Preconditions.checkState(
        formatSupportedMatrix.containsKey(type), "unsupported catalog type: %s", type);

    Set<TableFormat> supportedFormats = formatSupportedMatrix.get(type);
    Preconditions.checkState(
        supportedFormats.containsAll(tableFormats),
        "Table format %s is not supported for metastore type: %s",
        tableFormats,
        type);

    switch (type) {
      case CATALOG_TYPE_HADOOP:
      case CATALOG_TYPE_GLUE:
      case CATALOG_TYPE_CUSTOM:
        return new ExternalCatalog(catalogMeta);
      case CATALOG_TYPE_HIVE:
        String amsUri = getAmsURI(serverConfiguration);
        catalogMeta.getCatalogProperties().put(CatalogMetaProperties.AMS_URI, amsUri);
        catalogMeta
            .getCatalogProperties()
            .put(CLIENT_POOL_SIZE, String.valueOf(CLIENT_POOL_SIZE_DEFAULT));
        return new ExternalCatalog(catalogMeta);
      case CATALOG_TYPE_AMS:
        return new InternalCatalogImpl(catalogMeta, serverConfiguration);
      default:
        throw new IllegalStateException("unsupported catalog type:" + type);
    }
  }
matrix of catalog type and supported table formats
amoro-ams/src/main/java/org/apache/amoro/server/catalog/CatalogBuilder.java