java.io.Serializable, java.lang.Comparable<NodeQueueLoadMonitor.LoadComparator>, java.util.Comparator<ClusterNode>public static enum NodeQueueLoadMonitor.LoadComparator extends java.lang.Enum<NodeQueueLoadMonitor.LoadComparator> implements java.util.Comparator<ClusterNode>
| Enum Constant | Description |
|---|---|
QUEUE_LENGTH |
This policy only considers queue length.
|
QUEUE_LENGTH_THEN_RESOURCES |
This policy considers both queue length and resources.
|
QUEUE_WAIT_TIME |
This policy only considers the wait time of containers in the queue.
|
| Modifier and Type | Method | Description |
|---|---|---|
int |
compare(ClusterNode o1,
ClusterNode o2) |
|
boolean |
compareAndIncrement(ClusterNode c,
int incrementSize,
org.apache.hadoop.yarn.api.records.Resource requested) |
Increment the metric by a delta if it is below the threshold.
|
int |
getMetric(ClusterNode c) |
|
org.apache.hadoop.yarn.util.resource.ResourceCalculator |
getResourceCalculator() |
|
boolean |
isNodeAvailable(ClusterNode cn) |
Whether we should be placing OContainers on a node.
|
static NodeQueueLoadMonitor.LoadComparator |
valueOf(java.lang.String name) |
Returns the enum constant of this type with the specified name.
|
static NodeQueueLoadMonitor.LoadComparator[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final NodeQueueLoadMonitor.LoadComparator QUEUE_LENGTH
public static final NodeQueueLoadMonitor.LoadComparator QUEUE_WAIT_TIME
public static final NodeQueueLoadMonitor.LoadComparator QUEUE_LENGTH_THEN_RESOURCES
public static NodeQueueLoadMonitor.LoadComparator[] values()
for (NodeQueueLoadMonitor.LoadComparator c : NodeQueueLoadMonitor.LoadComparator.values()) System.out.println(c);
public static NodeQueueLoadMonitor.LoadComparator valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic int compare(ClusterNode o1, ClusterNode o2)
compare in interface java.util.Comparator<ClusterNode>public org.apache.hadoop.yarn.util.resource.ResourceCalculator getResourceCalculator()
public int getMetric(ClusterNode c)
public boolean compareAndIncrement(ClusterNode c, int incrementSize, org.apache.hadoop.yarn.api.records.Resource requested)
c - ClusterNodeincrementSize - increment sizerequested - the requested resourcepublic boolean isNodeAvailable(ClusterNode cn)
cn - the clusterNodeCopyright © 2008–2025 Apache Software Foundation. All rights reserved.