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:24 -0700 |
commit | 32fad4233f353814496c84e15ba64326730b7ae7 (patch) | |
tree | 97ea9523b190d3744020d05f2ac25e6a8cfe7af5 /core/src/main/scala | |
parent | cf1d32e3e1071829b152d4b597bf0a0d7a5629a2 (diff) | |
download | spark-32fad4233f353814496c84e15ba64326730b7ae7.tar.gz spark-32fad4233f353814496c84e15ba64326730b7ae7.tar.bz2 spark-32fad4233f353814496c84e15ba64326730b7ae7.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`.
Diffstat (limited to 'core/src/main/scala')
-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 b11786368e..e0f2fd622f 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 @@ -372,6 +372,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) |