public interface SchedulerDriver
| Modifier and Type | Method and Description |
|---|---|
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, Collection) instead. |
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, Collection, Filters) instead. |
org.apache.mesos.Protos.Status |
reconcileTasks(Collection<org.apache.mesos.Protos.TaskStatus> statuses)
Allows the framework to query the status for non-terminal tasks.
|
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.OfferID>, java.util.Collection<org.apache.mesos.Protos.TaskInfo>, org.apache.mesos.Protos.Filters)). |
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.
|
org.apache.mesos.Protos.Status start()
Protos.Statusorg.apache.mesos.Protos.Status stop(boolean failover)
failover - Whether framework failover is expected.Protos.Statusorg.apache.mesos.Protos.Status stop()
stop(boolean)
for more details.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<org.apache.mesos.Protos.Offer>) callback,
asynchronously.requests - The resource requests.Protos.Request,
Protos.Statusorg.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)).offerIds - The collection of offer IDs.tasks - The collection of tasks to be launched.filters - The filters to set for any remaining resources.Protos.OfferID,
Protos.TaskInfo,
Protos.Filters,
Protos.Statusorg.apache.mesos.Protos.Status launchTasks(Collection<org.apache.mesos.Protos.OfferID> offerIds, Collection<org.apache.mesos.Protos.TaskInfo> tasks)
offerIds - The collection of offer IDs.tasks - The collection of tasks to be launched.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)
#launchTasks(Collection, Collection, Filters) instead.offerId - The offer ID.tasks - The collection of tasks to be launched.filters - The filters to set for any remaining resources.org.apache.mesos.Protos.Status launchTasks(org.apache.mesos.Protos.OfferID offerId,
Collection<org.apache.mesos.Protos.TaskInfo> tasks)
launchTasks(Collection, Collection) instead.offerId - The offer ID.tasks - The collection of tasks to be launched.org.apache.mesos.Protos.Status killTask(org.apache.mesos.Protos.TaskID taskId)
taskId - The ID of the task to be killed.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<org.apache.mesos.Protos.Offer>)
callback.offerId - The ID of the offer to be declined.filters - The filters to set for any remaining resources.Protos.OfferID,
Protos.Filters,
Protos.Statusorg.apache.mesos.Protos.Status declineOffer(org.apache.mesos.Protos.OfferID offerId)
offerId - The ID of the offer to be declined.Protos.OfferID,
Protos.Statusorg.apache.mesos.Protos.Status reviveOffers()
launchTasks(java.util.Collection<org.apache.mesos.Protos.OfferID>, java.util.Collection<org.apache.mesos.Protos.TaskInfo>, org.apache.mesos.Protos.Filters)). This enables the framework to receive offers
from those filtered slaves.Protos.Statusorg.apache.mesos.Protos.Status sendFrameworkMessage(org.apache.mesos.Protos.ExecutorID executorId,
org.apache.mesos.Protos.SlaveID slaveId,
byte[] data)
executorId - The ID of the executor to send the message to.slaveId - The ID of the slave that is running the executor.data - The message.Protos.ExecutorID,
Protos.SlaveIDorg.apache.mesos.Protos.Status reconcileTasks(Collection<org.apache.mesos.Protos.TaskStatus> statuses)
statuses - The collection of non-terminal TaskStatuses to reconcile.Protos.TaskStatus,
Protos.SlaveIDCopyright © 2014 The Apache Software Foundation. All Rights Reserved.