yihua commented on code in PR #18454:
URL: https://github.com/apache/hudi/pull/18454#discussion_r3035017848


##########
hudi-hadoop-common/src/main/java/org/apache/hudi/common/config/DFSPropertiesConfiguration.java:
##########
@@ -258,7 +258,7 @@ private static Option<StoragePath> getConfPathFromEnv() {
     if (StringUtils.isNullOrEmpty(URI.create(confDir).getScheme())) {
       confDir = "file://" + confDir;
     }
-    return Option.of(new StoragePath(confDir + File.separator + 
DEFAULT_PROPERTIES_FILE));
+    return Option.of(new StoragePath(confDir + StoragePath.SEPARATOR + 
DEFAULT_PROPERTIES_FILE));

Review Comment:
   🤖 This fixes the join separator correctly. One thing I'm wondering about: on 
Windows, `HUDI_CONF_DIR` would typically be set to something like 
`C:\hudi\conf`, so after the `file://` prefix is added you'd end up with 
`file://C:\hudi\conf/hudi-defaults.conf` — mixed separators. Is there a 
follow-up needed to normalize the backslashes in `confDir` itself before 
constructing the `StoragePath`? Or does `StoragePath`'s URI parsing handle that 
gracefully?



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