public class ExecSorterByConstraintSeverity extends Object implements IExecSorter
Constructor and Description |
---|
ExecSorterByConstraintSeverity(Cluster cluster,
TopologyDetails topologyDetails) |
Modifier and Type | Method and Description |
---|---|
protected <K extends Comparable<K>,V extends Comparable<V>> |
sortByValues(Map<K,V> map)
Used to sort a Map by the values - higher values up front.
|
List<ExecutorDetails> |
sortExecutors(Set<ExecutorDetails> unassignedExecutors)
Sort the supplied unique collection of ExecutorDetails in the order in which they should be scheduled.
|
public ExecSorterByConstraintSeverity(Cluster cluster, TopologyDetails topologyDetails)
public List<ExecutorDetails> sortExecutors(Set<ExecutorDetails> unassignedExecutors)
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.
sortExecutors
in interface IExecSorter
unassignedExecutors
- an unmodifiable set of executors that need to be scheduled.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.
Copyright © 2022 The Apache Software Foundation. All rights reserved.