yihua commented on code in PR #10835:
URL: https://github.com/apache/hudi/pull/10835#discussion_r1767500807
##########
hudi-common/src/main/java/org/apache/hudi/common/config/DFSPropertiesConfiguration.java:
##########
@@ -113,15 +112,14 @@ public static TypedProperties loadGlobalProps() {
}
}
// Try loading the external config file from local file system
+ try {
+ conf.addPropsFromFile(DEFAULT_PATH);
+ } catch (Exception e) {
+ LOG.warn("Cannot load default config file: " + DEFAULT_PATH, e);
+ }
Review Comment:
We'll need to update the docs to reflect this change.
##########
hudi-common/src/main/java/org/apache/hudi/common/config/DFSPropertiesConfiguration.java:
##########
@@ -104,7 +104,6 @@ public static TypedProperties loadGlobalProps() {
if (configFile != null) {
try (BufferedReader br = new BufferedReader(new
InputStreamReader(configFile.openStream()))) {
conf.addPropsFromStream(br, new Path(configFile.toURI()));
- return conf.getProps();
Review Comment:
We can keep this. Hudi jar does not bundle any properties file.
##########
hudi-common/src/main/java/org/apache/hudi/common/config/DFSPropertiesConfiguration.java:
##########
@@ -113,15 +112,14 @@ public static TypedProperties loadGlobalProps() {
}
}
// Try loading the external config file from local file system
+ try {
+ conf.addPropsFromFile(DEFAULT_PATH);
+ } catch (Exception e) {
+ LOG.warn("Cannot load default config file: " + DEFAULT_PATH, e);
+ }
Review Comment:
I think this makes sense so the default configs are always loaded and user
can provide a config file to override ones of interest, instead of putting all
default configs in the user-provided config file.
--
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]