morningman commented on code in PR #41834:
URL: https://github.com/apache/doris/pull/41834#discussion_r1800441807


##########
fe/fe-core/src/main/java/org/apache/doris/fs/remote/dfs/DFSFileSystem.java:
##########
@@ -128,6 +136,26 @@ public static Configuration getHdfsConf(boolean 
fallbackToSimpleAuth) {
         return hdfsConf;
     }
 
+    private void loadConfigFromResources(Configuration conf) {

Review Comment:
   This method is unused?



##########
fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HMSExternalCatalog.java:
##########
@@ -203,6 +206,26 @@ protected void initLocalObjectsImpl() {
         icebergHiveCatalog = IcebergUtils.createIcebergHiveCatalog(this, 
getName());
     }
 
+    private void initHiveConfIfNeeded(HiveConf hiveConf) {
+        String resourcesPath = 
catalogProperty.getOrDefault(HMSProperties.HIVE_CONFIG_RESOURCES, null);
+        if (Strings.isNullOrEmpty(resourcesPath)) {
+            return;
+        }
+        for (String resource : resourcesPath.split(",")) {
+            // Construct the full path to the resource
+            String resourcePath = Config.external_catalog_config_dir + 
File.separator + resource.trim();
+            File file = new File(resourcePath); // Create a File object for 
the resource path
+
+            // Check if the file exists and is a regular file
+            if (file.exists() && file.isFile()) {
+                hiveConf.addResource(new Path(file.toURI())); // Add the 
resource to the configuration
+            } else {
+                // Handle the case where the file does not exist
+                LOG.warn("Hive configuration resource file {} does not exist", 
resourcePath);

Review Comment:
   1. add catalog name in log.
   2. What if xml does not found? Is there any impact?



-- 
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]

Reply via email to