Class GenericSchedulingAlgorithm
- java.lang.Object
-
- uk.co.ractf.polaris.controller.scheduler.GenericSchedulingAlgorithm
-
- All Implemented Interfaces:
SchedulingAlgorithm
public class GenericSchedulingAlgorithm extends java.lang.Object implements SchedulingAlgorithm
The default implementation ofSchedulingAlgorithm
. The scheduler placesTask
s onto nodes by running a series ofPlugin
s to filter and score the nodes to find the best place to run instances of the task.This is done in the following stages: - Checking the cluster meets the conditions required to run the task - Filtering which nodes can run the task - Scoring the nodes
In the future, this might be extended to include things such as evicting lower priority tasks.
-
-
Constructor Summary
Constructors Constructor Description GenericSchedulingAlgorithm(ClusterState clusterState, java.util.Set<ClusterPredicatePlugin> clusterPredicatePlugins, java.util.Set<FilterPlugin> filterPlugins, java.util.Set<ScorePlugin> scorePlugins)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ScheduleResult
schedule(uk.co.ractf.polaris.api.task.Task task)
Schedule aTask
onto the cluster
-
-
-
Constructor Detail
-
GenericSchedulingAlgorithm
@Inject public GenericSchedulingAlgorithm(ClusterState clusterState, java.util.Set<ClusterPredicatePlugin> clusterPredicatePlugins, java.util.Set<FilterPlugin> filterPlugins, java.util.Set<ScorePlugin> scorePlugins)
-
-
Method Detail
-
schedule
public ScheduleResult schedule(uk.co.ractf.polaris.api.task.Task task)
Description copied from interface:SchedulingAlgorithm
Schedule aTask
onto the cluster- Specified by:
schedule
in interfaceSchedulingAlgorithm
- Parameters:
task
- the task to schedule- Returns:
- the node to run the task on
-
-