vanzin 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_r320887506
 
 

 ##########
 File path: 
core/src/main/java/org/apache/spark/shuffle/sort/io/LocalDiskShuffleMapOutputWriter.java
 ##########
 @@ -97,6 +98,19 @@ public ShufflePartitionWriter getPartitionWriter(int 
reducePartitionId) throws I
 
   @Override
   public long[] commitAllPartitions() throws IOException {
+    // Check the position after transferTo loop to see if it is in the right 
position and raise a
+    // exception if it is incorrect. The position will not be increased to the 
expected length
+    // after calling transferTo in kernel version 2.6.32. This issue is 
described at
+    // https://bugs.openjdk.java.net/browse/JDK-7052359 and SPARK-3948.
+    if (outputFileChannel != null
+        && outputFileChannel.position() != bytesWrittenToMergedFile) {
 
 Review comment:
   nit: `&&` goes in previous line

----------------------------------------------------------------
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