Class ExecSorterByConstraintSeverity
java.lang.Object
org.apache.storm.scheduler.resource.strategies.scheduling.sorter.ExecSorterByConstraintSeverity
- All Implemented Interfaces:
IExecSorter
-
Constructor Summary
ConstructorsConstructorDescriptionExecSorterByConstraintSeverity
(Cluster cluster, TopologyDetails topologyDetails) -
Method Summary
Modifier and TypeMethodDescriptionprotected <K extends Comparable<K>,
V extends Comparable<V>>
NavigableMap<K,V> sortByValues
(Map<K, V> map) Used to sort a Map by the values - higher values up front.sortExecutors
(Set<ExecutorDetails> unassignedExecutors) Sort the supplied unique collection of ExecutorDetails in the order in which they should be scheduled.
-
Constructor Details
-
ExecSorterByConstraintSeverity
-
-
Method Details
-
sortExecutors
Description copied from interface:IExecSorter
Sort the supplied unique collection of ExecutorDetails in the order in which they should be scheduled. Both the input and output collections contain the same number of unique ExecutorDetails.- Specified by:
sortExecutors
in interfaceIExecSorter
- Parameters:
unassignedExecutors
- an unmodifiable set of executors that need to be scheduled.- Returns:
- a list of executors in sorted order for scheduling.
-
sortByValues
protected <K extends Comparable<K>,V extends Comparable<V>> NavigableMap<K,V> sortByValues(Map<K, V> map) Used to sort a Map by the values - higher values up front.
-