public interface IStrategy
An interface to for implementing different scheduling strategies for the resource aware scheduling.
Modifier and Type | Method and Description |
---|---|
void |
prepare(Map<String,Object> config)
Prepare the Strategy for scheduling.
|
SchedulingResult |
schedule(Cluster schedulingState,
TopologyDetails td)
This method is invoked to calculate a scheduling for topology td.
|
void prepare(Map<String,Object> config)
Prepare the Strategy for scheduling.
config
- the cluster configurationSchedulingResult schedule(Cluster schedulingState, TopologyDetails td)
This method is invoked to calculate a scheduling for topology td. Cluster will reject any changes that are not for the given topology. Any changes made to the cluster will be committed if the scheduling is successful.
NOTE: scheduling occurs as a runnable in an interruptible thread. Scheduling should consider being interrupted if long running.schedulingState
- the current state of the clustertd
- the topology to schedule forCopyright © 2022 The Apache Software Foundation. All rights reserved.