|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SchedulerDriver
Abstract interface for connecting a scheduler to Mesos. This interface is used both to manage the scheduler's lifecycle (start it, stop it, or wait for it to finish) and to interact with Mesos (e.g., launch tasks, kill tasks, etc.).
| Method Summary | |
|---|---|
org.apache.mesos.Protos.Status |
abort()
Aborts the driver so that no more callbacks can be made to the scheduler. |
org.apache.mesos.Protos.Status |
declineOffer(org.apache.mesos.Protos.OfferID offerId)
Declines an offer in its entirety. |
org.apache.mesos.Protos.Status |
declineOffer(org.apache.mesos.Protos.OfferID offerId,
org.apache.mesos.Protos.Filters filters)
Declines an offer in its entirety and applies the specified filters on the resources (see mesos.proto for a description of Filters). |
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 |
killTask(org.apache.mesos.Protos.TaskID taskId)
Kills the specified task. |
org.apache.mesos.Protos.Status |
launchTasks(Collection<org.apache.mesos.Protos.OfferID> offerIds,
Collection<org.apache.mesos.Protos.TaskInfo> tasks)
Launches the given set of tasks. |
org.apache.mesos.Protos.Status |
launchTasks(Collection<org.apache.mesos.Protos.OfferID> offerIds,
Collection<org.apache.mesos.Protos.TaskInfo> tasks,
org.apache.mesos.Protos.Filters filters)
Launches the given set of tasks on a set of offers. |
org.apache.mesos.Protos.Status |
launchTasks(org.apache.mesos.Protos.OfferID offerId,
Collection<org.apache.mesos.Protos.TaskInfo> tasks)
Deprecated. Use launchTasks( Collection |
org.apache.mesos.Protos.Status |
launchTasks(org.apache.mesos.Protos.OfferID offerId,
Collection<org.apache.mesos.Protos.TaskInfo> tasks,
org.apache.mesos.Protos.Filters filters)
Deprecated. Use launchTasks( Collection |
org.apache.mesos.Protos.Status |
reconcileTasks(Collection<org.apache.mesos.Protos.TaskStatus> statuses)
Reconciliation of tasks causes the master to send status updates for tasks whose status differs from the status sent here. |
org.apache.mesos.Protos.Status |
requestResources(Collection<org.apache.mesos.Protos.Request> requests)
Requests resources from Mesos (see mesos.proto for a description of Request and how, for example, to request resources from specific slaves). |
org.apache.mesos.Protos.Status |
reviveOffers()
Removes all filters, previously set by the framework (via launchTasks(java.util.Collection). |
org.apache.mesos.Protos.Status |
run()
Starts and immediately joins (i.e., blocks on) the driver. |
org.apache.mesos.Protos.Status |
sendFrameworkMessage(org.apache.mesos.Protos.ExecutorID executorId,
org.apache.mesos.Protos.SlaveID slaveId,
byte[] data)
Sends a message from the framework to one of its executors. |
org.apache.mesos.Protos.Status |
start()
Starts the scheduler driver. |
org.apache.mesos.Protos.Status |
stop()
Stops the scheduler driver assuming no failover. |
org.apache.mesos.Protos.Status |
stop(boolean failover)
Stops the scheduler driver. |
| Method Detail |
|---|
org.apache.mesos.Protos.Status start()
org.apache.mesos.Protos.Status stop(boolean failover)
org.apache.mesos.Protos.Status stop()
org.apache.mesos.Protos.Status abort()
join(), see below), and instantiate
and start another driver if desired (from within the same
process).
org.apache.mesos.Protos.Status join()
org.apache.mesos.Protos.Status run()
org.apache.mesos.Protos.Status requestResources(Collection<org.apache.mesos.Protos.Request> requests)
Scheduler.resourceOffers(org.apache.mesos.SchedulerDriver, java.util.List) callback,
asynchronously.
org.apache.mesos.Protos.Status launchTasks(Collection<org.apache.mesos.Protos.OfferID> offerIds,
Collection<org.apache.mesos.Protos.TaskInfo> tasks,
org.apache.mesos.Protos.Filters filters)
declineOffer(org.apache.mesos.Protos.OfferID, org.apache.mesos.Protos.Filters).
org.apache.mesos.Protos.Status launchTasks(Collection<org.apache.mesos.Protos.OfferID> offerIds,
Collection<org.apache.mesos.Protos.TaskInfo> tasks)
org.apache.mesos.Protos.Status launchTasks(org.apache.mesos.Protos.OfferID offerId,
Collection<org.apache.mesos.Protos.TaskInfo> tasks,
org.apache.mesos.Protos.Filters filters)
org.apache.mesos.Protos.Status launchTasks(org.apache.mesos.Protos.OfferID offerId,
Collection<org.apache.mesos.Protos.TaskInfo> tasks)
org.apache.mesos.Protos.Status killTask(org.apache.mesos.Protos.TaskID taskId)
org.apache.mesos.Protos.Status declineOffer(org.apache.mesos.Protos.OfferID offerId,
org.apache.mesos.Protos.Filters filters)
Scheduler.resourceOffers(org.apache.mesos.SchedulerDriver, java.util.List)
callback.
org.apache.mesos.Protos.Status declineOffer(org.apache.mesos.Protos.OfferID offerId)
org.apache.mesos.Protos.Status reviveOffers()
launchTasks(java.util.Collection, java.util.Collection, org.apache.mesos.Protos.Filters) ). This enables the framework to receive offers
from those filtered slaves.
org.apache.mesos.Protos.Status sendFrameworkMessage(org.apache.mesos.Protos.ExecutorID executorId,
org.apache.mesos.Protos.SlaveID slaveId,
byte[] data)
org.apache.mesos.Protos.Status reconcileTasks(Collection<org.apache.mesos.Protos.TaskStatus> statuses)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||