Skip to content

Commit 5967f11

Browse files
author
Liupengcheng
committed
Refine
1 parent 818379b commit 5967f11

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

core/src/main/scala/org/apache/spark/scheduler/OutputCommitCoordinator.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,9 @@ private[spark] class OutputCommitCoordinator(conf: SparkConf, isDriver: Boolean)
181181
partition: Int,
182182
attemptNumber: Int): Boolean = synchronized {
183183
stageStates.get(stage) match {
184-
case Some(state) if attemptInvalidOrFailed(state, stageAttempt, partition, attemptNumber) =>
184+
case Some(state) if attemptOutdatedOrFailed(state, stageAttempt, partition, attemptNumber) =>
185185
logInfo(s"Commit denied for stage=$stage.$stageAttempt, partition=$partition: " +
186-
s"task attempt $attemptNumber already marked as failed.")
186+
s"task attempt $attemptNumber already outdated or marked as failed.")
187187
false
188188
case Some(state) =>
189189
val existing = state.authorizedCommitters(partition)
@@ -204,7 +204,7 @@ private[spark] class OutputCommitCoordinator(conf: SparkConf, isDriver: Boolean)
204204
}
205205
}
206206

207-
private def attemptInvalidOrFailed(
207+
private def attemptOutdatedOrFailed(
208208
stageState: StageState,
209209
stageAttempt: Int,
210210
partition: Int,

core/src/test/scala/org/apache/spark/scheduler/OutputCommitCoordinatorSuite.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ class OutputCommitCoordinatorSuite extends SparkFunSuite with BeforeAndAfter {
288288
outputCommitCoordinator.taskCompleted(stage, stageAttempt - 1, partition,
289289
attemptNumber = taskAttempt,
290290
reason = Success)
291-
// attempts of current stage is authorized for committing
291+
// attempts of latest retry stage is authorized for committing
292292
assert(outputCommitCoordinator.canCommit(stage, stageAttempt, partition, taskAttempt))
293293
}
294294
}

0 commit comments

Comments
 (0)