public class NodeQueueLoadMonitor extends Object implements ClusterMonitor
Modifier and Type | Class and Description |
---|---|
static class |
NodeQueueLoadMonitor.LoadComparator
The comparator used to specify the metric against which the load
of two Nodes are compared.
|
Constructor and Description |
---|
NodeQueueLoadMonitor(long nodeComputationInterval,
NodeQueueLoadMonitor.LoadComparator comparator,
int numNodes) |
Modifier and Type | Method and Description |
---|---|
void |
addNode(List<org.apache.hadoop.yarn.server.api.protocolrecords.NMContainerStatus> containerStatuses,
RMNode rmNode) |
QueueLimitCalculator |
getThresholdCalculator() |
void |
initThresholdCalculator(float sigma,
int limitMin,
int limitMax) |
void |
removeNode(RMNode removedRMNode) |
RMNode |
selectAnyNode(Set<String> blacklist) |
List<org.apache.hadoop.yarn.api.records.NodeId> |
selectLeastLoadedNodes(int k)
Returns 'K' of the least Loaded Node Ids as ordered list.
|
RMNode |
selectLocalNode(String hostName,
Set<String> blacklist) |
List<org.apache.hadoop.yarn.api.records.NodeId> |
selectNodes()
Returns all Node Ids as ordered list from Least to Most Loaded.
|
RMNode |
selectRackLocalNode(String rackName,
Set<String> blacklist) |
void |
stop() |
void |
updateNode(RMNode rmNode) |
void |
updateNodeResource(RMNode rmNode,
org.apache.hadoop.yarn.api.records.ResourceOption resourceOption) |
public NodeQueueLoadMonitor(long nodeComputationInterval, NodeQueueLoadMonitor.LoadComparator comparator, int numNodes)
public QueueLimitCalculator getThresholdCalculator()
public void stop()
public void initThresholdCalculator(float sigma, int limitMin, int limitMax)
public void addNode(List<org.apache.hadoop.yarn.server.api.protocolrecords.NMContainerStatus> containerStatuses, RMNode rmNode)
addNode
in interface ClusterMonitor
public void removeNode(RMNode removedRMNode)
removeNode
in interface ClusterMonitor
public void updateNode(RMNode rmNode)
updateNode
in interface ClusterMonitor
public void updateNodeResource(RMNode rmNode, org.apache.hadoop.yarn.api.records.ResourceOption resourceOption)
updateNodeResource
in interface ClusterMonitor
public List<org.apache.hadoop.yarn.api.records.NodeId> selectNodes()
public List<org.apache.hadoop.yarn.api.records.NodeId> selectLeastLoadedNodes(int k)
k
- max number of nodes to returnCopyright © 2008–2020 Apache Software Foundation. All rights reserved.