java.io.Closeable, java.lang.AutoCloseable, org.apache.hadoop.service.Servicepublic abstract class NodeAttributesManager
extends org.apache.hadoop.service.AbstractService
| Constructor | Description |
|---|---|
NodeAttributesManager(java.lang.String name) |
| Modifier and Type | Method | Description |
|---|---|---|
abstract void |
addNodeAttributes(java.util.Map<java.lang.String,java.util.Set<org.apache.hadoop.yarn.api.records.NodeAttribute>> nodeAttributeMapping) |
It adds or updates the attribute mapping for a given node with out
impacting other existing attribute mapping.
|
abstract java.util.Map<org.apache.hadoop.yarn.api.records.NodeAttribute,AttributeValue> |
getAttributesForNode(java.lang.String hostName) |
NodeAttribute to AttributeValue Map.
|
abstract java.util.Map<org.apache.hadoop.yarn.api.records.NodeAttributeKey,java.util.Map<java.lang.String,AttributeValue>> |
getAttributesToNodes(java.util.Set<org.apache.hadoop.yarn.api.records.NodeAttributeKey> attributes) |
Return a map of Nodes to attribute value for the given NodeAttributeKeys.
|
abstract java.util.Set<org.apache.hadoop.yarn.api.records.NodeAttribute> |
getClusterNodeAttributes(java.util.Set<java.lang.String> prefix) |
Returns a set of node attributes whose prefix is one of the given
prefixes; if the prefix set is null or empty, all attributes are returned;
if prefix set is given but no mapping could be found, an empty set
is returned.
|
abstract java.util.Map<java.lang.String,java.util.Set<org.apache.hadoop.yarn.api.records.NodeAttribute>> |
getNodesToAttributes(java.util.Set<java.lang.String> hostNames) |
Get all node to Attributes mapping.
|
abstract java.util.List<org.apache.hadoop.yarn.server.api.protocolrecords.NodeToAttributes> |
getNodeToAttributes(java.util.Set<java.lang.String> prefix) |
Get All node to Attributes list based on filter.
|
abstract void |
refreshNodeAttributesToScheduler(org.apache.hadoop.yarn.api.records.NodeId nodeId) |
Refresh node attributes on a given node during RM recovery.
|
abstract void |
removeNodeAttributes(java.util.Map<java.lang.String,java.util.Set<org.apache.hadoop.yarn.api.records.NodeAttribute>> nodeAttributeMapping) |
It removes the specified attribute mapping for a given node with out
impacting other existing attribute mapping.
|
abstract void |
replaceNodeAttributes(java.lang.String prefix,
java.util.Map<java.lang.String,java.util.Set<org.apache.hadoop.yarn.api.records.NodeAttribute>> nodeAttributeMapping) |
To completely replace the mappings for a given node with the new Set of
Attributes which are under a given prefix.
|
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, serviceInit, serviceStart, serviceStop, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStoppublic abstract void replaceNodeAttributes(java.lang.String prefix,
java.util.Map<java.lang.String,java.util.Set<org.apache.hadoop.yarn.api.records.NodeAttribute>> nodeAttributeMapping)
throws java.io.IOException
prefix - node attribute prefixnodeAttributeMapping - host name to a set of node attributes mappingjava.io.IOException - if failed to replace attributespublic abstract void addNodeAttributes(java.util.Map<java.lang.String,java.util.Set<org.apache.hadoop.yarn.api.records.NodeAttribute>> nodeAttributeMapping)
throws java.io.IOException
nodeAttributeMapping - host name to a set of node attributes mapping.java.io.IOException - io error occur.public abstract void removeNodeAttributes(java.util.Map<java.lang.String,java.util.Set<org.apache.hadoop.yarn.api.records.NodeAttribute>> nodeAttributeMapping)
throws java.io.IOException
nodeAttributeMapping - host name to a set of node attributes mapping.java.io.IOException - io error occur.public abstract java.util.Set<org.apache.hadoop.yarn.api.records.NodeAttribute> getClusterNodeAttributes(java.util.Set<java.lang.String> prefix)
prefix - set of prefix string's for which the attributes needs to
returnedpublic abstract java.util.Map<org.apache.hadoop.yarn.api.records.NodeAttributeKey,java.util.Map<java.lang.String,AttributeValue>> getAttributesToNodes(java.util.Set<org.apache.hadoop.yarn.api.records.NodeAttributeKey> attributes)
attributes - attributes set.public abstract java.util.Map<org.apache.hadoop.yarn.api.records.NodeAttribute,AttributeValue> getAttributesForNode(java.lang.String hostName)
hostName - host name.public abstract java.util.List<org.apache.hadoop.yarn.server.api.protocolrecords.NodeToAttributes> getNodeToAttributes(java.util.Set<java.lang.String> prefix)
prefix - filter prefix set.public abstract java.util.Map<java.lang.String,java.util.Set<org.apache.hadoop.yarn.api.records.NodeAttribute>> getNodesToAttributes(java.util.Set<java.lang.String> hostNames)
hostNames - host names.public abstract void refreshNodeAttributesToScheduler(org.apache.hadoop.yarn.api.records.NodeId nodeId)
nodeId - Node IdCopyright © 2008–2025 Apache Software Foundation. All rights reserved.