Class ExecSorterByConstraintSeverity

    • Constructor Detail

      • ExecSorterByConstraintSeverity

        public ExecSorterByConstraintSeverity​(Cluster cluster,
                                              TopologyDetails topologyDetails)
    • Method Detail

      • sortExecutors

        public List<ExecutorDetails> sortExecutors​(Set<ExecutorDetails> unassignedExecutors)
        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 interface IExecSorter
        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.