Skip to content

Commit

Permalink
Got rid of terrible double-negative name
Browse files Browse the repository at this point in the history
  • Loading branch information
kayousterhout committed Jun 25, 2014
1 parent 80b3205 commit 42dfa7e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,7 @@ class DAGScheduler(
private def failJobAndIndependentStages(job: ActiveJob, failureReason: String,
resultStage: Option[Stage]) {
val error = new SparkException(failureReason)
var unableToCancelStages = false
var ableToCancelStages = true

val shouldInterruptThread =
if (job.properties == null) false
Expand Down Expand Up @@ -1070,14 +1070,14 @@ class DAGScheduler(
} catch {
case e: UnsupportedOperationException =>
logInfo(s"Could not cancel tasks for stage $stageId", e)
unableToCancelStages = true
ableToCancelStages = false
}
}
}
}
}

if (!unableToCancelStages) {
if (ableToCancelStages) {
job.listener.jobFailed(error)
cleanupStateForJobAndIndependentStages(job, resultStage)
listenerBus.post(SparkListenerJobEnd(job.jobId, JobFailed(error)))
Expand Down

0 comments on commit 42dfa7e

Please sign in to comment.