You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/11/15 17:44:16 UTC
[GitHub] [flink] tillrohrmann commented on a change in pull request #15999: [FLINK-22769][flink-yarn]yarnship symlinks support
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org