diff options
author | Brenden Matthews <brenden@diddyinc.com> | 2014-10-05 09:49:24 -0700 |
---|---|---|
committer | Andrew Or <andrewor14@gmail.com> | 2014-10-05 09:49:35 -0700 |
commit | d9cf4d08ae392cc840fac21ba153fdf9d9219782 (patch) | |
tree | c2ed32810cb1b6dd59ef2ed7ec0cad3816d3823d /core/src | |
parent | e4ddedee6b2b6873254d1f8e1021e91893a6a96e (diff) | |
download | spark-d9cf4d08ae392cc840fac21ba153fdf9d9219782.tar.gz spark-d9cf4d08ae392cc840fac21ba153fdf9d9219782.tar.bz2 spark-d9cf4d08ae392cc840fac21ba153fdf9d9219782.zip |
[SPARK-3597][Mesos] Implement `killTask`.
The MesosSchedulerBackend did not previously implement `killTask`,
resulting in an exception.
Author: Brenden Matthews <brenden@diddyinc.com>
Closes #2453 from brndnmtthws/implement-killtask and squashes the following commits:
23ddcdc [Brenden Matthews] [SPARK-3597][Mesos] Implement `killTask`.
(cherry picked from commit 32fad4233f353814496c84e15ba64326730b7ae7)
Signed-off-by: Andrew Or <andrewor14@gmail.com>
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosSchedulerBackend.scala | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosSchedulerBackend.scala b/core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosSchedulerBackend.scala index 06f2c09714..8f064bffea 100644 --- a/core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosSchedulerBackend.scala +++ b/core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosSchedulerBackend.scala @@ -369,6 +369,13 @@ private[spark] class MesosSchedulerBackend( recordSlaveLost(d, slaveId, ExecutorExited(status)) } + override def killTask(taskId: Long, executorId: String, interruptThread: Boolean): Unit = { + driver.killTask( + TaskID.newBuilder() + .setValue(taskId.toString).build() + ) + } + // TODO: query Mesos for number of cores override def defaultParallelism() = sc.conf.getInt("spark.default.parallelism", 8) } |