Skip to content

Commit

Permalink
Back out extra cleanup-handling code, since this is already covered i…
Browse files Browse the repository at this point in the history
…n stop()
  • Loading branch information
JoshRosen committed May 25, 2015
1 parent 25aa3bd commit 7f15f7b
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

package org.apache.spark.shuffle.sort

import scala.util.control.NonFatal

import org.apache.spark._
import org.apache.spark.executor.ShuffleWriteMetrics
import org.apache.spark.scheduler.MapStatus
Expand Down Expand Up @@ -77,13 +75,7 @@ private[spark] class SortShuffleWriter[K, V, C](
// (see SPARK-3570).
val outputFile = shuffleBlockResolver.getDataFile(dep.shuffleId, mapId)
val blockId = ShuffleBlockId(dep.shuffleId, mapId, IndexShuffleBlockResolver.NOOP_REDUCE_ID)
val partitionLengths = try {
sorter.writePartitionedFile(blockId, context, outputFile)
} catch {
case NonFatal(e) =>
outputFile.delete()
throw e
}
val partitionLengths = sorter.writePartitionedFile(blockId, context, outputFile)
shuffleBlockResolver.writeIndexFile(dep.shuffleId, mapId, partitionLengths)

mapStatus = MapStatus(blockManager.shuffleServerId, partitionLengths)
Expand Down

0 comments on commit 7f15f7b

Please sign in to comment.