public class DefaultScheduler extends AbstractScheduler
configStore, schedulerConfig, stateStore, statusExecutor| Modifier | Constructor and Description |
|---|---|
protected |
DefaultScheduler(ServiceSpec serviceSpec,
SchedulerConfig schedulerConfig,
java.util.Collection<java.lang.Object> customResources,
java.util.Collection<Plan> plans,
StateStore stateStore,
ConfigStore<ServiceSpec> configStore,
java.util.Map<java.lang.String,EndpointProducer> customEndpointProducers,
java.util.Optional<RecoveryPlanOverriderFactory> recoveryPlanOverriderFactory)
Creates a new DefaultScheduler.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) PlanCoordinator |
getPlanCoordinator() |
java.util.Collection<java.lang.Object> |
getResources()
Returns a list of API resources to be served by the scheduler to the local cluster.
|
protected PlanCoordinator |
initialize(SchedulerDriver driver)
Performs any additional Scheduler initialization after registration has completed.
|
static SchedulerBuilder |
newBuilder(ServiceSpec serviceSpec,
SchedulerConfig schedulerConfig)
Creates a new
SchedulerBuilder based on the provided ServiceSpec describing the service,
including details such as the service name, the pods/tasks to be deployed, and the plans describing how the
deployment should be organized. |
static SchedulerBuilder |
newBuilder(ServiceSpec serviceSpec,
SchedulerConfig schedulerConfig,
Persister persister)
Creates a new
SchedulerBuilder based on the provided ServiceSpec describing the service,
including details such as the service name, the pods/tasks to be deployed, and the plans describing how the
deployment should be organized. |
protected void |
processOffers(SchedulerDriver driver,
java.util.List<Protos.Offer> offers,
java.util.Collection<Step> steps)
The abstract scheduler will periodically call this method with a list of available offers, which may be empty.
|
protected void |
processStatusUpdate(Protos.TaskStatus status)
Handles a task status update which was received from Mesos.
|
awaitOffersProcessed, disableApiServer, disableThreading, getMesosScheduler, getPlans, setOfferQueueSize, startprotected DefaultScheduler(ServiceSpec serviceSpec, SchedulerConfig schedulerConfig, java.util.Collection<java.lang.Object> customResources, java.util.Collection<Plan> plans, StateStore stateStore, ConfigStore<ServiceSpec> configStore, java.util.Map<java.lang.String,EndpointProducer> customEndpointProducers, java.util.Optional<RecoveryPlanOverriderFactory> recoveryPlanOverriderFactory)
SchedulerBuilder.public static SchedulerBuilder newBuilder(ServiceSpec serviceSpec, SchedulerConfig schedulerConfig) throws PersisterException
SchedulerBuilder based on the provided ServiceSpec describing the service,
including details such as the service name, the pods/tasks to be deployed, and the plans describing how the
deployment should be organized.PersisterExceptionpublic static SchedulerBuilder newBuilder(ServiceSpec serviceSpec, SchedulerConfig schedulerConfig, Persister persister) throws PersisterException
SchedulerBuilder based on the provided ServiceSpec describing the service,
including details such as the service name, the pods/tasks to be deployed, and the plans describing how the
deployment should be organized.PersisterExceptionpublic java.util.Collection<java.lang.Object> getResources()
AbstractSchedulerAbstractScheduler.initialize(SchedulerDriver) has been called.getResources in class AbstractSchedulerprotected PlanCoordinator initialize(SchedulerDriver driver) throws java.lang.Exception
AbstractSchedulerSchedulerDriver may be used to talk to Mesos. Returns a PlanCoordinator which will be used to
select candidate workloads.initialize in class AbstractSchedulerjava.lang.Exceptionprotected void processOffers(SchedulerDriver driver,
java.util.List<Protos.Offer> offers,
java.util.Collection<Step> steps)
AbstractSchedulerprocessOffers in class AbstractSchedulerprotected void processStatusUpdate(Protos.TaskStatus status)
AbstractSchedulerprocessStatusUpdate in class AbstractSchedulerPlanCoordinator getPlanCoordinator()