Skip to content

Commit

Permalink
Merge pull request #618 from palantir/yh/removal-check-hack
Browse files Browse the repository at this point in the history
[SPARK-25299] Check for existence outside executor before removing
  • Loading branch information
yifeih authored Oct 31, 2019
2 parents 45b0d28 + ed95788 commit af0ad25
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions core/src/main/scala/org/apache/spark/MapOutputTracker.scala
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,14 @@ private[spark] class MapOutputTrackerMaster(
def unregisterMapOutput(shuffleId: Int, mapId: Int, bmAddress: BlockManagerId) {
shuffleStatuses.get(shuffleId) match {
case Some(shuffleStatus) =>
shuffleStatus.removeMapOutput(mapId, bmAddress)
incrementEpoch()
if (shuffleStatus.mapStatuses(mapId) != null &&
!shuffleDriverComponents.checkIfMapOutputStoredOutsideExecutor(
shuffleId,
mapId,
shuffleStatus.mapStatuses(mapId).mapTaskAttemptId)) {
shuffleStatus.removeMapOutput(mapId, bmAddress)
incrementEpoch()
}
case None =>
throw new SparkException("unregisterMapOutput called for nonexistent shuffle ID")
}
Expand Down

0 comments on commit af0ad25

Please sign in to comment.