This project has retired. For details please refer to its Attic page.
Scheduler
JavaScript is disabled on your browser.
Skip navigation links
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.apache.mesos

Interface Scheduler



  • public interface Scheduler
    Callback interface to be implemented by frameworks' schedulers. Note that only one callback will be invoked at a time, so it is not recommended that you block within a callback because it may cause a deadlock.

    Each callback includes a reference to the scheduler driver that was used to run this scheduler. The reference will not change for the duration of a scheduler (i.e., from the point you do SchedulerDriver.start() to the point that SchedulerDriver.join() returns). This is intended for convenience so that a scheduler doesn't need to store a reference to the driver itself.

    • Method Detail

      • registered

        void registered(SchedulerDriver driver,
         Protos.FrameworkID frameworkId,
         Protos.MasterInfo masterInfo)
        Invoked when the scheduler successfully registers with a Mesos master. A unique ID (generated by the master) used for distinguishing this framework from others and MasterInfo with the IP and port of the current master are provided as arguments.
        Parameters:
        driver - The scheduler driver that was registered.
        frameworkId - The framework ID generated by the master.
        masterInfo - Info about the current master, including IP and port.
        See Also:
        SchedulerDriver, Protos.FrameworkID, Protos.MasterInfo
      • reregistered

        void reregistered(SchedulerDriver driver,
         Protos.MasterInfo masterInfo)
        Invoked when the scheduler reregisters with a newly elected Mesos master. This is only called when the scheduler has previously been registered. MasterInfo containing the updated information about the elected master is provided as an argument.
        Parameters:
        driver - The driver that was reregistered.
        masterInfo - The updated information about the elected master.
        See Also:
        SchedulerDriver, Protos.MasterInfo
      • statusUpdate

        void statusUpdate(SchedulerDriver driver,
         Protos.TaskStatus status)
        Invoked when the status of a task has changed (e.g., a slave is lost and so the task is lost, a task finishes and an executor sends a status update saying so, etc). If implicit acknowledgements are being used, then returning from this callback _acknowledges_ receipt of this status update! If for whatever reason the scheduler aborts during this callback (or the process exits) another status update will be delivered (note, however, that this is currently not true if the slave sending the status update is lost/fails during that time). If explicit acknowledgements are in use, the scheduler must acknowledge this status on the driver.
        Parameters:
        driver - The driver that was used to run this scheduler.
        status - The status update, which includes the task ID and status.
        See Also:
        SchedulerDriver, Protos.TaskStatus
      • frameworkMessage

        void frameworkMessage(SchedulerDriver driver,
         Protos.ExecutorID executorId,
         Protos.SlaveID slaveId,
         byte[] data)
        Invoked when an executor sends a message. These messages are best effort; do not expect a framework message to be retransmitted in any reliable fashion.
        Parameters:
        driver - The driver that received the message.
        executorId - The ID of the executor that sent the message.
        slaveId - The ID of the slave that launched the executor.
        data - The message payload.
        See Also:
        SchedulerDriver, Protos.ExecutorID, Protos.SlaveID
      • disconnected

        void disconnected(SchedulerDriver driver)
        Invoked when the scheduler becomes "disconnected" from the master (e.g., the master fails and another is taking over).
        Parameters:
        driver - The driver that was used to run this scheduler.
        See Also:
        SchedulerDriver
      • slaveLost

        void slaveLost(SchedulerDriver driver,
         Protos.SlaveID slaveId)
        Invoked when a slave has been determined unreachable (e.g., machine failure, network partition). Most frameworks will need to reschedule any tasks launched on this slave on a new slave. NOTE: This callback is not reliably delivered. If a host or network failure causes messages between the master and the scheduler to be dropped, this callback may not be invoked.
        Parameters:
        driver - The driver that was used to run this scheduler.
        slaveId - The ID of the slave that was lost.
        See Also:
        SchedulerDriver, Protos.SlaveID
      • executorLost

        void executorLost(SchedulerDriver driver,
         Protos.ExecutorID executorId,
         Protos.SlaveID slaveId,
         int status)
        Invoked when an executor has exited/terminated. Note that any tasks running will have TASK_LOST status updates automagically generated. NOTE: This callback is not reliably delivered. If a host or network failure causes messages between the master and the scheduler to be dropped, this callback may not be invoked.
        Parameters:
        driver - The driver that was used to run this scheduler.
        executorId - The ID of the executor that was lost.
        slaveId - The ID of the slave that launched the executor.
        status - The exit status of the executor.
        See Also:
        SchedulerDriver, Protos.ExecutorID, Protos.SlaveID, Protos.Status
      • error

        void error(SchedulerDriver driver,
         java.lang.String message)
        Invoked when there is an unrecoverable error in the scheduler or driver. The driver will be aborted BEFORE invoking this callback.
        Parameters:
        driver - The driver that was used to run this scheduler.
        message - The error message.
        See Also:
        SchedulerDriver
Skip navigation links
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

AltStyle によって変換されたページ (->オリジナル) /