Skip to content

Commit

Permalink
minor style changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Woody committed Feb 16, 2017
1 parent ce17e02 commit b0ac2a7
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ private[spark] class OutputCommitCoordinator(conf: SparkConf, isDriver: Boolean)

/**
* Map from active stages's id => authorized task attempts for each partition id, which hold an
* exclusive lock on committing task output for that partition as well as any known failed
* exclusive lock on committing task output for that partition, as well as any known failed
* attempts in the stage.
*
* Entries are added to the top-level map when stages start and are removed they finish
Expand Down Expand Up @@ -203,11 +203,8 @@ private[spark] class OutputCommitCoordinator(conf: SparkConf, isDriver: Boolean)
private def attemptFailed(stage: StageId,
partition: PartitionId,
attempt: TaskAttemptNumber): Boolean = synchronized {
stageStates.get(stage) match {
case Some(state) =>
state.failures.get(partition)
.exists(_.contains(attempt))
case None => false
stageStates.get(stage).exists { state =>
state.failures.get(partition).exists(_.contains(attempt))
}
}
}
Expand Down

0 comments on commit b0ac2a7

Please sign in to comment.