[SPARK-1749] Job cancellation when SchedulerBackend does not implement killTask

It turns out that having the DAGScheduler tell the taskScheduler to cancelTasks when the backend does not implement killTask (e.g. Mesos) is not such a good idea.
Sure, doing nothing is easy.


On Fri, Jun 20, 2014 at 10:47 AM, Kay Ousterhout <notifications@github.com>
wrote:

> In core/src/test/scala/org/apache/spark/scheduler/DAGSchedulerSuite.scala:
>
> > @@ -313,6 +314,47 @@ class DAGSchedulerSuite extends TestKit(ActorSystem("DAGSchedulerSuite")) with F
> >      assertDataStructuresEmpty
> >    }
> >
> > +  test("job cancellation no-kill backend") {
> > +    // make sure that the DAGScheduler doesn't crash when the TaskScheduler
> > +    // doesn't implement killTask()
> > +    val noKillTaskScheduler = new TaskScheduler() {
> > +      override def rootPool: Pool = null
> > +      override def schedulingMode: SchedulingMode = SchedulingMode.NONE
> > +      override def start() = {}
> > +      override def stop() = {}
> > +      override def submitTasks(taskSet: TaskSet) = {
> > +        // normally done by TaskSetManager
> > +        taskSet.tasks.foreach(_.epoch = mapOutputTracker.getEpoch)
>
> are these lines necessary (can you just do nothing here?)
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/apache/spark/pull/686/files#r14031997>.
>