tillrohrmann commented on a change in pull request #15999:
URL: https://github.com/apache/flink/pull/15999#discussion_r749549922
##########
File path:
flink-yarn/src/main/java/org/apache/flink/yarn/YarnApplicationFileUploader.java
##########
@@ -257,20 +254,15 @@ YarnLocalResourceDescriptor registerSingleLocalResource(
if (file.isDirectory()) {
final java.nio.file.Path shipPath = file.toPath();
final java.nio.file.Path parentPath = shipPath.getParent();
- Files.walkFileTree(
- shipPath,
- new SimpleFileVisitor<java.nio.file.Path>() {
- @Override
- public FileVisitResult visitFile(
- java.nio.file.Path file,
BasicFileAttributes attrs) {
- localPaths.add(new Path(file.toUri()));
- relativePaths.add(
- new Path(
- localResourcesDirectory,
-
parentPath.relativize(file).toString()));
- return FileVisitResult.CONTINUE;
- }
- });
+ Collection<java.nio.file.Path> paths =
+ FileUtils.listFilesInDirectory(shipPath, path ->
true);
Review comment:
Can you add a test for `Fileutils.listFilesInDirectory` that ensures
that it follows symlinks?
--
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]