hello-stephen commented on code in PR #71089:
URL: https://github.com/apache/doris/pull/71089#discussion_r4739829713
##########
fe/fe-connector/fe-connector-iceberg/src/main/java/org/apache/doris/connector/iceberg/IcebergConnector.java:
##########
@@ -1125,13 +1125,35 @@ private Catalog createDlfCatalog(String catalogName,
if (!chosenS3.isPresent() ||
!"OSS".equals(chosenS3.get().providerName())) {
throw new DorisConnectorException("Iceberg dlf catalog requires
OSS storage properties");
}
+ Map<String, String> storageHadoopConfig = buildStorageHadoopConfig();
DlfMetaStoreProperties dlf = (DlfMetaStoreProperties)
MetaStoreProviders.bindForType(
- IcebergCatalogProperties.TYPE_DLF, properties,
buildStorageHadoopConfig());
- Configuration conf =
IcebergCatalogFactory.buildDlfConfiguration(dlf.toDlfCatalogConf());
+ IcebergCatalogProperties.TYPE_DLF, properties,
storageHadoopConfig);
+ Map<String, String> dlfConf = dlf.toDlfCatalogConf();
+ Configuration conf;
+ AbstractHmsMetaStoreProperties proxyHms;
+ if ("DLF_ONLY".equals(dlfConf.get("dlf.catalog.proxyMode"))) {
+ conf = IcebergCatalogFactory.buildDlfConfiguration(dlfConf);
+ proxyHms = null;
+ } else {
+ // Proxy modes also open HMS clients: preserve their URI,
resources and metadata identity
+ // without running FileIO under that identity or repeating the
storage overlay afterwards.
+ AbstractHmsMetaStoreProperties hms =
(AbstractHmsMetaStoreProperties) MetaStoreProviders.bindForType(
+ IcebergCatalogProperties.TYPE_HMS, properties,
storageHadoopConfig);
+ Map<String, String> overrides =
hms.toHiveConfOverrides(IcebergConf.metastoreClientTimeoutSecond(context));
Review Comment:
[P1] Register native DLF proxy HMS endpoints with the catalog gate
This branch also runs for standalone `type=iceberg,
iceberg.catalog.type=dlf` catalogs. With `security_checker_class_name`
configured, `dlf.proxy.mode=METASTORE_ONLY`, valid DLF/OSS settings,
`hive.metastore.uris=thrift://127.0.0.1:9083` (or `uri`) and
`test_connection=false`, CREATE/ALTER accepts the private endpoint and the
first metadata access opens the HMS client.
`IcebergConnectorProvider.securitySurface()` declares only `kms.endpoint`, so
Hive's endpoint declarations do not cover this newly enabled path. The base DLF
branch dropped these inline HMS properties; the new overrides now forward them
to `DLFClientPool` and its [vendor
proxy](https://raw.githubusercontent.com/aliyun/datalake-catalog-metastore-client/master/metastore-client-hive/metastore-client-hive3/src/main/java/com/aliyun/datalake/metastore/hive2/ProxyMetaStoreClient.java).
Declare the consumed HMS URI aliases on the Iceberg provider and cover native
DLF CREATE/ALTER with the configured checker.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]