danny0405 commented on code in PR #19519:
URL: https://github.com/apache/hudi/pull/19519#discussion_r3892474288
##########
hudi-client/hudi-flink-client/src/main/java/org/apache/hudi/util/FlinkClientUtil.java:
##########
@@ -59,6 +59,15 @@ public static org.apache.hadoop.conf.Configuration
getHadoopConf() {
return hadoopConf;
}
+ public static org.apache.hadoop.conf.Configuration getHadoopConf(String
hadoopConfDir) {
+ org.apache.hadoop.conf.Configuration hadoopConf;
+ hadoopConf = getHadoopConfiguration(hadoopConfDir);
+ if (hadoopConf == null){
+ hadoopConf = new org.apache.hadoop.conf.Configuration();
Review Comment:
If we retain fallback behavior rather than the fail-fast alternative
discussed above, could we call the existing no-argument `getHadoopConf()` here?
That reuses the Hadoop configuration discovery at line 47 (`HADOOP_CONF_DIR` /
`HADOOP_HOME`, then classpath defaults), instead of skipping environment
discovery and going directly to `new Configuration()`.
```suggestion
hadoopConf = getHadoopConf();
```
Please also log a warning with the invalid explicit directory so users can
see that fallback occurred.
--
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]