diff options
author | roxchkplusony <roxchkplusony@gmail.com> | 2014-11-27 15:54:40 -0800 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2014-11-27 15:54:40 -0800 |
commit | 84376d31392858f7df215ddb3f05419181152e68 (patch) | |
tree | 9585c06345c4bfbef109cbb49165e20355139d0a /core | |
parent | 5d7fe178b303918faa0893cd36963158b420309f (diff) | |
download | spark-84376d31392858f7df215ddb3f05419181152e68.tar.gz spark-84376d31392858f7df215ddb3f05419181152e68.tar.bz2 spark-84376d31392858f7df215ddb3f05419181152e68.zip |
[SPARK-4626] Kill a task only if the executorId is (still) registered 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
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/scala/org/apache/spark/scheduler/cluster/CoarseGrainedSchedulerBackend.scala | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/core/src/main/scala/org/apache/spark/scheduler/cluster/CoarseGrainedSchedulerBackend.scala b/core/src/main/scala/org/apache/spark/scheduler/cluster/CoarseGrainedSchedulerBackend.scala index 047fae104b..88b196ac64 100644 --- a/core/src/main/scala/org/apache/spark/scheduler/cluster/CoarseGrainedSchedulerBackend.scala +++ b/core/src/main/scala/org/apache/spark/scheduler/cluster/CoarseGrainedSchedulerBackend.scala @@ -127,7 +127,13 @@ class CoarseGrainedSchedulerBackend(scheduler: TaskSchedulerImpl, val actorSyste makeOffers() case KillTask(taskId, executorId, interruptThread) => - executorDataMap(executorId).executorActor ! KillTask(taskId, executorId, interruptThread) + executorDataMap.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 |