Interface SchedulerState

All Known Implementing Classes:
SchedulerStateImpl

public interface SchedulerState
The cluster state for tasks managed by a scheduler. Abstracts away the details of managing tasks, allowing the scheduler to work only with overall number of tasks.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    cancel(Task task)
     
    Returns the list of active tasks that have not yet been cancelled.
    int
    The number of active tasks that have been cancelled, but have not yet ended.
     
    Returns the list of tasks awaiting a container request to be sent to YARN or for which a container request has been sent to YARN, but no container allocation has yet been received.
    int
    The number of tasks in any active (non-ended) lifecycle state.
    void
    start(Task task)
    Start the given task.
  • Method Details

    • getTaskCount

      int getTaskCount()
      The number of tasks in any active (non-ended) lifecycle state.
      Returns:
      The number of tasks in any active (non-ended) lifecycle state.
    • getCancelledTaskCount

      int getCancelledTaskCount()
      The number of active tasks that have been cancelled, but have not yet ended.
    • getStartingTasks

      List<Task> getStartingTasks()
      Returns the list of tasks awaiting a container request to be sent to YARN or for which a container request has been sent to YARN, but no container allocation has yet been received. Such tasks are simple to cancel. The list does not contain any tasks in this state which have previously been cancelled.
      Returns:
      The list of tasks awaiting a container request to be sent to YARN or for which a container request has been sent to YARN, but no container allocation has yet been received.
    • getActiveTasks

      List<Task> getActiveTasks()
      Returns the list of active tasks that have not yet been cancelled. Active tasks are any task for which a container has been assigned, but has not yet received a RM container completion event.
      Returns:
      The list of active tasks that have not yet been cancelled.
    • start

      void start(Task task)
      Start the given task.
      Parameters:
      task -
    • cancel

      void cancel(Task task)
    • getController

      ClusterController getController()