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

    https://github.com/apache/spark/pull/20119#discussion_r159370554
  
    --- Diff: 
common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/OneForOneBlockFetcher.java
 ---
    @@ -165,7 +165,7 @@ private void failRemainingBlocks(String[] 
failedBlockIds, Throwable e) {
     
         DownloadCallback(int chunkIndex) throws IOException {
           this.targetFile = tempFileManager.createTempFile();
    -      this.channel = 
Channels.newChannel(Files.newOutputStream(targetFile.toPath()));
    +      this.channel = Channels.newChannel(new FileOutputStream(targetFile));
    --- End diff --
    
    Seems `Channels.newChannel` has an optimization for `FileOutputStream`: 
http://www.grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/8-b132/java/nio/channels/Channels.java#424


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to