@@ -268,8 +268,7 @@ private long[] mergeSpills(SpillInfo[] spills) throws IOException {
268268 mapId ,
269269 taskContext .taskAttemptId (),
270270 partitioner .numPartitions ());
271- mapWriter .commitAllPartitions ();
272- return new long [partitioner .numPartitions ()];
271+ return mapWriter .commitAllPartitions ();
273272 } else if (spills .length == 1 ) {
274273 Optional <SingleSpillShuffleMapOutputWriter > maybeSingleFileWriter =
275274 shuffleExecutorComponents .createSingleFileMapOutputWriter (
@@ -379,7 +378,7 @@ private void mergeSpillsWithFileStream(
379378 inputBufferSizeInBytes );
380379 }
381380 for (int partition = 0 ; partition < numPartitions ; partition ++) {
382- boolean copyThrewExecption = true ;
381+ boolean copyThrewException = true ;
383382 ShufflePartitionWriter writer = mapWriter .getPartitionWriter (partition );
384383 OutputStream partitionOutput = writer .openStream ();
385384 try {
@@ -409,9 +408,9 @@ private void mergeSpillsWithFileStream(
409408 }
410409 }
411410 }
412- copyThrewExecption = false ;
411+ copyThrewException = false ;
413412 } finally {
414- Closeables .close (partitionOutput , copyThrewExecption );
413+ Closeables .close (partitionOutput , copyThrewException );
415414 }
416415 long numBytesWritten = writer .getNumBytesWritten ();
417416 writeMetrics .incBytesWritten (numBytesWritten );
@@ -458,10 +457,10 @@ private void mergeSpillsWithTransferTo(
458457 final FileChannel spillInputChannel = spillInputChannels [i ];
459458 final long writeStartTime = System .nanoTime ();
460459 Utils .copyFileStreamNIO (
461- spillInputChannel ,
462- resolvedChannel .channel (),
463- spillInputChannelPositions [i ],
464- partitionLengthInSpill );
460+ spillInputChannel ,
461+ resolvedChannel .channel (),
462+ spillInputChannelPositions [i ],
463+ partitionLengthInSpill );
465464 copyThrewExecption = false ;
466465 spillInputChannelPositions [i ] += partitionLengthInSpill ;
467466 writeMetrics .incWriteTime (System .nanoTime () - writeStartTime );
0 commit comments