TJX2014 commented on code in PR #7105:
URL: https://github.com/apache/hudi/pull/7105#discussion_r1011105643
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/bootstrap/BootstrapUtils.java:
##########
@@ -79,7 +79,7 @@ public static List<Pair<String, List<HoodieFileStatus>>>
getAllLeafFoldersWithFi
result.addAll(context.flatMap(subDirectories, directory -> {
PathFilter pathFilter = getFilePathFilter(baseFileExtension);
Path path = new Path(directory);
- FileSystem fileSystem = path.getFileSystem(new Configuration());
+ FileSystem fileSystem = FSUtils.getFs(path, fs.getConf());
RemoteIterator<LocatedFileStatus> itr = fileSystem.listFiles(path,
true);
Review Comment:
For context.flatMap is not thread safe, three is many thread in
`context.flatMap` may operate same `fs` if not create new one in `directory ->
{} function`.
--
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]