File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
core/src/main/java/org/apache/spark/shuffle/unsafe Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 1919
2020import java .io .File ;
2121import java .io .IOException ;
22- import java .util .Iterator ;
2322import java .util .LinkedList ;
2423
2524import org .apache .spark .storage .*;
Original file line number Diff line number Diff line change @@ -182,15 +182,15 @@ private long[] mergeSpills(SpillInfo[] spills) throws IOException {
182182 for (int partition = 0 ; partition < numPartitions ; partition ++) {
183183 for (int i = 0 ; i < spills .length ; i ++) {
184184 final long partitionLengthInSpill = spills [i ].partitionLengths [partition ];
185- long bytesRemainingToBeTransferred = partitionLengthInSpill ;
185+ long bytesToTransfer = partitionLengthInSpill ;
186186 final FileChannel spillInputChannel = spillInputChannels [i ];
187- while (bytesRemainingToBeTransferred > 0 ) {
187+ while (bytesToTransfer > 0 ) {
188188 final long actualBytesTransferred = spillInputChannel .transferTo (
189189 spillInputChannelPositions [i ],
190- bytesRemainingToBeTransferred ,
190+ bytesToTransfer ,
191191 mergedFileOutputChannel );
192192 spillInputChannelPositions [i ] += actualBytesTransferred ;
193- bytesRemainingToBeTransferred -= actualBytesTransferred ;
193+ bytesToTransfer -= actualBytesTransferred ;
194194 }
195195 partitionLengths [partition ] += partitionLengthInSpill ;
196196 }
You can’t perform that action at this time.
0 commit comments