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

import spark.scheduler.cluster.TaskInfo
import scala.collection.mutable.Map

import spark.TaskEndReason
import spark.executor.TaskMetrics

/**
 * 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],
                taskInfo: TaskInfo, taskMetrics: TaskMetrics): 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
}