Skip to content

Commit 5e8cf75

Browse files
committed
More minor cleanup
1 parent e67f1ea commit 5e8cf75

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

core/src/main/java/org/apache/spark/shuffle/unsafe/UnsafeShuffleExternalSorter.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
import java.io.File;
2121
import java.io.IOException;
22-
import java.util.Iterator;
2322
import java.util.LinkedList;
2423

2524
import org.apache.spark.storage.*;

core/src/main/java/org/apache/spark/shuffle/unsafe/UnsafeShuffleWriter.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)