nsivabalan commented on a change in pull request #4090:
URL: https://github.com/apache/hudi/pull/4090#discussion_r756333314



##########
File path: 
hudi-common/src/main/java/org/apache/hudi/common/config/DFSPropertiesConfiguration.java
##########
@@ -119,13 +123,13 @@ public void addPropsFromFile(Path filePath) {
     if (visitedFilePaths.contains(filePath.toString())) {
       throw new IllegalStateException("Loop detected; file " + filePath + " 
already referenced");
     }
-    FileSystem fileSystem;
-    try {
-      fileSystem = fs != null ? fs : filePath.getFileSystem(new 
Configuration());
-    } catch (IOException e) {
-      throw new IllegalArgumentException("Cannot get the file system from file 
path", e);
-    }
-    try (BufferedReader reader = new BufferedReader(new 
InputStreamReader(fileSystem.open(filePath)))) {
+
+    FileSystem fs = FSUtils.getFs(
+        filePath.toString(),
+        Option.ofNullable(hadoopConfig).orElseGet(Configuration::new)
+    );

Review comment:
       this is called just once to load props from external file right? I mean, 
once per write operation. looks ok to me. 




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