bp #39641 Co-authored-by: wuwenchi <wuwenchihdu@hotmail.com>
This commit is contained in:
@ -58,7 +58,7 @@ public class IcebergGlueExternalCatalog extends IcebergExternalCatalog {
|
||||
catalogProperties.get(S3Properties.Env.ENDPOINT));
|
||||
catalogProperties.putIfAbsent(S3FileIOProperties.ENDPOINT, endpoint);
|
||||
|
||||
glueCatalog.initialize(icebergCatalogType, catalogProperties);
|
||||
glueCatalog.initialize(getName(), catalogProperties);
|
||||
catalog = glueCatalog;
|
||||
}
|
||||
|
||||
|
||||
@ -44,7 +44,7 @@ public class IcebergHMSExternalCatalog extends IcebergExternalCatalog {
|
||||
Map<String, String> catalogProperties = catalogProperty.getProperties();
|
||||
String metastoreUris = catalogProperty.getOrDefault(HMSProperties.HIVE_METASTORE_URIS, "");
|
||||
catalogProperties.put(CatalogProperties.URI, metastoreUris);
|
||||
hiveCatalog.initialize(icebergCatalogType, catalogProperties);
|
||||
hiveCatalog.initialize(getName(), catalogProperties);
|
||||
catalog = hiveCatalog;
|
||||
}
|
||||
}
|
||||
|
||||
@ -61,7 +61,7 @@ public class IcebergHadoopExternalCatalog extends IcebergExternalCatalog {
|
||||
String warehouse = catalogProperty.getHadoopProperties().get(CatalogProperties.WAREHOUSE_LOCATION);
|
||||
hadoopCatalog.setConf(conf);
|
||||
catalogProperties.put(CatalogProperties.WAREHOUSE_LOCATION, warehouse);
|
||||
hadoopCatalog.initialize(icebergCatalogType, catalogProperties);
|
||||
hadoopCatalog.initialize(getName(), catalogProperties);
|
||||
catalog = hadoopCatalog;
|
||||
}
|
||||
}
|
||||
|
||||
@ -106,6 +106,11 @@ public class IcebergMetadataOps implements ExternalMetadataOps {
|
||||
ErrorReport.reportDdlException(ErrorCode.ERR_DB_CREATE_EXISTS, dbName);
|
||||
}
|
||||
}
|
||||
String icebergCatalogType = dorisCatalog.getIcebergCatalogType();
|
||||
if (!properties.isEmpty() && !IcebergExternalCatalog.ICEBERG_HMS.equals(icebergCatalogType)) {
|
||||
throw new DdlException(
|
||||
"Not supported: create database with properties for iceberg catalog type: " + icebergCatalogType);
|
||||
}
|
||||
nsCatalog.createNamespace(Namespace.of(dbName), properties);
|
||||
dorisCatalog.onRefreshCache(true);
|
||||
}
|
||||
|
||||
@ -47,7 +47,7 @@ public class IcebergRestExternalCatalog extends IcebergExternalCatalog {
|
||||
|
||||
Configuration conf = replaceS3Properties(getConfiguration());
|
||||
|
||||
catalog = CatalogUtil.buildIcebergCatalog(icebergCatalogType,
|
||||
catalog = CatalogUtil.buildIcebergCatalog(getName(),
|
||||
convertToRestCatalogProperties(),
|
||||
conf);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user