aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/scala/spark/scheduler/TaskSchedulerListener.scala
blob: 9fcef86e46a29673133f2884defdde81b8caf9b9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package spark.scheduler

import scala.collection.mutable.Map

import spark.TaskEndReason

/**
 * Interface for getting events back from the TaskScheduler.
 */
private[spark] trait TaskSchedulerListener {
  // A task has finished or failed.
  def taskEnded(task: Task[_], reason: TaskEndReason, result: Any, accumUpdates: Map[Long, Any]): Unit

  // A node was lost from the cluster.
  def executorLost(execId: String): Unit

  // The TaskScheduler wants to abort an entire task set.
  def taskSetFailed(taskSet: TaskSet, reason: String): Unit
}