Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/6107#discussion_r192692204
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/filecache/FileCache.java 
---
    @@ -302,6 +308,30 @@ public Path call() throws IOException {
                }
        }
     
    +   /**
    +    * Asynchronous file copy process.
    +    */
    +   private static class CopyFromDFSProcess implements Callable<Path> {
    +
    +           private final Path filePath;
    +           private final Path cachedPath;
    +           private boolean executable;
    +
    +           public CopyFromDFSProcess(DistributedCacheEntry e, Path 
cachedPath) {
    +                   this.filePath = new Path(e.filePath);
    +                   this.executable = e.isExecutable;
    +                   this.cachedPath = cachedPath;
    +           }
    +
    +           @Override
    +           public Path call() throws IOException {
    +                   // let exceptions propagate. we can retrieve them later 
from
    +                   // the future and report them upon access to the result
    +                   copy(filePath, cachedPath, this.executable);
    --- End diff --
    
    can you prefix this with `FileUtils`? Imo this makes the code more readable.


---

Reply via email to