Skip to content

Commit

Permalink
[SPARK-4626] Kill a task only if the executorId is (still) registered…
Browse files Browse the repository at this point in the history
… with the scheduler

Author: roxchkplusony <roxchkplusony@gmail.com>

Closes #3483 from roxchkplusony/bugfix/4626 and squashes the following commits:

aba9184 [roxchkplusony] replace warning message per review
5e7fdea [roxchkplusony] [SPARK-4626] Kill a task only if the executorId is (still) registered with the scheduler
  • Loading branch information
roxchkplusony committed Nov 28, 2014
1 parent a59c445 commit 4f95baf
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,13 @@ class CoarseGrainedSchedulerBackend(scheduler: TaskSchedulerImpl, actorSystem: A
makeOffers()

case KillTask(taskId, executorId, interruptThread) =>
executorActor(executorId) ! KillTask(taskId, executorId, interruptThread)
executorActor.get(executorId) match {
case Some(executorInfo) =>
executorInfo.executorActor ! KillTask(taskId, executorId, interruptThread)
case None =>
// Ignoring the task kill since the executor is not registered.
logWarning(s"Attempted to kill task $taskId for unknown executor $executorId.")
}

case StopDriver =>
sender ! true
Expand Down

0 comments on commit 4f95baf

Please sign in to comment.