nsivabalan commented on code in PR #18805:
URL: https://github.com/apache/hudi/pull/18805#discussion_r3478952159


##########
hudi-hadoop-common/src/main/java/org/apache/hudi/common/config/DFSPropertiesConfiguration.java:
##########
@@ -118,15 +118,18 @@ public static TypedProperties loadGlobalProps() {
             String.format("Failed to read %s from class loader", 
DEFAULT_PROPERTIES_FILE), ioe);
       }
     }
-    // Try loading the external config file from local file system
+    // Try loading the external config file from local file system. Both 
DEFAULT_PATH and
+    // HUDI_CONF_DIR are optional global config locations — use the tolerant 
overload so a
+    // missing file does not propagate as an exception (preserves prior 
behavior covered by
+    // testClassInitializationNeverThrows).

Review Comment:
   Updated comment in 3d1bbb1d8146 to drop the method-name reference — now 
reads "preserves prior silent-ignore behavior for optional global-defaults 
paths".



##########
hudi-hadoop-common/src/main/java/org/apache/hudi/common/config/DFSPropertiesConfiguration.java:
##########
@@ -195,7 +219,9 @@ public void addPropsFromStream(BufferedReader reader, 
StoragePath cfgFilePath) t
               && cfgFilePath != null) {
             providedPath = new StoragePath(cfgFilePath.getParent(), split[1]);
           }
-          addPropsFromFile(providedPath);
+          // include= references may legitimately point to optional files 
(e.g. environment-
+          // specific overrides); skip silently when missing rather than 
failing the whole load.
+          addPropsFromFile(providedPath, true);

Review Comment:
   Considered keeping the include= recursion at debug — both global-defaults 
and include= share the tolerant code path, and bumping include= to warn would 
also make the (commonly absent) hudi-defaults.conf load emit a warning each 
time. The trade-off is: a typo'd include= can silently drop config, but 
legitimate optional-include is a common pattern. Leaving at debug for now; 
happy to revisit with a per-call-site log level if the silent-drop risk is more 
important than the noise.



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

Reply via email to