squito commented on a change in pull request #25304: 
[SPARK-28570][CORE][SHUFFLE] Make UnsafeShuffleWriter use the new API.
URL: https://github.com/apache/spark/pull/25304#discussion_r309368430
 
 

 ##########
 File path: 
core/src/main/java/org/apache/spark/shuffle/sort/io/LocalDiskShuffleMapOutputWriter.java
 ##########
 @@ -124,6 +137,8 @@ private void cleanUp() throws IOException {
 
   private void initStream() throws IOException {
     if (outputFileStream == null) {
+      // This file needs to opened in append mode in order to work around a 
Linux kernel bug that
+      // affects transferTo; see SPARK-3948 for more details.
 
 Review comment:
   comment is actually more appropriate in `initChannel()` (transferTo is only 
used w/ the channel).
   
   btw, why does `initChannel` set the member variable `outputFileStream`?  
Couldn't it just set
   
   `outputChannel = new FileOutputStream(outputTempFile, true).getChannel();`?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to