public static enum NodeQueueLoadMonitor.LoadComparator extends Enum<NodeQueueLoadMonitor.LoadComparator> implements Comparator<org.apache.hadoop.yarn.server.resourcemanager.scheduler.distributed.NodeQueueLoadMonitor.ClusterNode>
Enum Constant and Description |
---|
QUEUE_LENGTH |
QUEUE_WAIT_TIME |
Modifier and Type | Method and Description |
---|---|
int |
compare(org.apache.hadoop.yarn.server.resourcemanager.scheduler.distributed.NodeQueueLoadMonitor.ClusterNode o1,
org.apache.hadoop.yarn.server.resourcemanager.scheduler.distributed.NodeQueueLoadMonitor.ClusterNode o2) |
boolean |
compareAndIncrement(org.apache.hadoop.yarn.server.resourcemanager.scheduler.distributed.NodeQueueLoadMonitor.ClusterNode c,
int incrementSize)
Increment the metric by a delta if it is below the threshold.
|
int |
getMetric(org.apache.hadoop.yarn.server.resourcemanager.scheduler.distributed.NodeQueueLoadMonitor.ClusterNode c) |
static NodeQueueLoadMonitor.LoadComparator |
valueOf(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.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public static final NodeQueueLoadMonitor.LoadComparator QUEUE_LENGTH
public static final NodeQueueLoadMonitor.LoadComparator QUEUE_WAIT_TIME
public static NodeQueueLoadMonitor.LoadComparator[] values()
for (NodeQueueLoadMonitor.LoadComparator c : NodeQueueLoadMonitor.LoadComparator.values()) System.out.println(c);
public static NodeQueueLoadMonitor.LoadComparator valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic int compare(org.apache.hadoop.yarn.server.resourcemanager.scheduler.distributed.NodeQueueLoadMonitor.ClusterNode o1, org.apache.hadoop.yarn.server.resourcemanager.scheduler.distributed.NodeQueueLoadMonitor.ClusterNode o2)
compare
in interface Comparator<org.apache.hadoop.yarn.server.resourcemanager.scheduler.distributed.NodeQueueLoadMonitor.ClusterNode>
public int getMetric(org.apache.hadoop.yarn.server.resourcemanager.scheduler.distributed.NodeQueueLoadMonitor.ClusterNode c)
public boolean compareAndIncrement(org.apache.hadoop.yarn.server.resourcemanager.scheduler.distributed.NodeQueueLoadMonitor.ClusterNode c, int incrementSize)
c
- ClusterNodeincrementSize
- increment sizeCopyright © 2008–2023 Apache Software Foundation. All rights reserved.