org.apache.mesos
Interface ExecutorDriver

All Known Implementing Classes:
MesosExecutorDriver

public interface ExecutorDriver

Abstract interface for connecting an executor to Mesos. This interface is used both to manage the executor's lifecycle (start it, stop it, or wait for it to finish) and to interact with Mesos (e.g., send status updates, send framework messages, etc.).


Method Summary
 org.apache.mesos.Protos.Status abort()
          Aborts the driver so that no more callbacks can be made to the executor.
 org.apache.mesos.Protos.Status join()
          Waits for the driver to be stopped or aborted, possibly _blocking_ the current thread indefinitely.
 org.apache.mesos.Protos.Status run()
          Starts and immediately joins (i.e., blocks on) the driver.
 org.apache.mesos.Protos.Status sendFrameworkMessage(byte[] data)
          Sends a message to the framework scheduler.
 org.apache.mesos.Protos.Status sendStatusUpdate(org.apache.mesos.Protos.TaskStatus status)
          Sends a status update to the framework scheduler, retrying as necessary until an acknowledgement has been received or the executor is terminated (in which case, a TASK_LOST status update will be sent).
 org.apache.mesos.Protos.Status start()
          Starts the executor driver.
 org.apache.mesos.Protos.Status stop()
          Stops the executor driver.
 

Method Detail

start

org.apache.mesos.Protos.Status start()
Starts the executor driver. This needs to be called before any other driver calls are made.


stop

org.apache.mesos.Protos.Status stop()
Stops the executor driver.


abort

org.apache.mesos.Protos.Status abort()
Aborts the driver so that no more callbacks can be made to the executor. The semantics of abort and stop have deliberately been separated so that code can detect an aborted driver (i.e., via the return status of join(), see below), and instantiate and start another driver if desired (from within the same process ... although this functionality is currently not supported for executors).


join

org.apache.mesos.Protos.Status join()
Waits for the driver to be stopped or aborted, possibly _blocking_ the current thread indefinitely. The return status of this function can be used to determine if the driver was aborted (see mesos.proto for a description of Status).


run

org.apache.mesos.Protos.Status run()
Starts and immediately joins (i.e., blocks on) the driver.


sendStatusUpdate

org.apache.mesos.Protos.Status sendStatusUpdate(org.apache.mesos.Protos.TaskStatus status)
Sends a status update to the framework scheduler, retrying as necessary until an acknowledgement has been received or the executor is terminated (in which case, a TASK_LOST status update will be sent). See Scheduler.statusUpdate(org.apache.mesos.SchedulerDriver, org.apache.mesos.Protos.TaskStatus) for more information about status update acknowledgements.


sendFrameworkMessage

org.apache.mesos.Protos.Status sendFrameworkMessage(byte[] data)
Sends a message to the framework scheduler. These messages are best effort; do not expect a framework message to be retransmitted in any reliable fashion.



Copyright © 2014 The Apache Software Foundation. All Rights Reserved.