yuqi1129 commented on code in PR #5020:
URL: https://github.com/apache/gravitino/pull/5020#discussion_r1798826123
##########
catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/HadoopCatalogOperations.java:
##########
@@ -119,26 +140,32 @@ public void initialize(
Map<String, String> config, CatalogInfo info, HasPropertyMetadata
propertiesMetadata)
throws RuntimeException {
this.propertiesMetadata = propertiesMetadata;
+ this.catalogInfo = info;
+
// Initialize Hadoop Configuration.
this.conf = config;
- this.hadoopConf = new Configuration();
- this.catalogInfo = info;
- Map<String, String> bypassConfigs =
- config.entrySet().stream()
+
+ this.bypassConfigs =
+ conf.entrySet().stream()
.filter(e -> e.getKey().startsWith(CATALOG_BYPASS_PREFIX))
.collect(
Collectors.toMap(
e -> e.getKey().substring(CATALOG_BYPASS_PREFIX.length()),
Map.Entry::getValue));
- bypassConfigs.forEach(hadoopConf::set);
+
+ String fileSystemProviders =
+ (String)
+ propertiesMetadata
+ .catalogPropertiesMetadata()
+ .getOrDefault(config,
HadoopCatalogPropertiesMetadata.FILESYSTEM_PROVIDERS);
+
+ FileSystemUtils.initFileSystemProviders(fileSystemProviders,
FILE_SYSTEM_PROVIDERS);
Review Comment:
> What's the purpose of making this FILE_SYSTEM_PROVIDERS static?
There is no clear proposal.
> how do you handle the concurrent issue if users create the Hadoop catalog
in the same time?
Yes, I omit this case, thanks for reminding.
--
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]