public abstract class NodeAttributesManager
extends org.apache.hadoop.service.AbstractService
Constructor and Description |
---|
NodeAttributesManager(String name) |
Modifier and Type | Method and Description |
---|---|
abstract void |
addNodeAttributes(Map<String,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 Map<org.apache.hadoop.yarn.api.records.NodeAttribute,AttributeValue> |
getAttributesForNode(String hostName)
NodeAttribute to AttributeValue Map.
|
abstract Map<org.apache.hadoop.yarn.api.records.NodeAttributeKey,Map<String,AttributeValue>> |
getAttributesToNodes(Set<org.apache.hadoop.yarn.api.records.NodeAttributeKey> attributes)
Return a map of Nodes to attribute value for the given NodeAttributeKeys.
|
abstract Set<org.apache.hadoop.yarn.api.records.NodeAttribute> |
getClusterNodeAttributes(Set<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 Map<String,Set<org.apache.hadoop.yarn.api.records.NodeAttribute>> |
getNodesToAttributes(Set<String> hostNames)
Get all node to Attributes mapping.
|
abstract List<org.apache.hadoop.yarn.server.api.protocolrecords.NodeToAttributes> |
getNodeToAttributes(Set<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(Map<String,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(String prefix,
Map<String,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, waitForServiceToStop
public NodeAttributesManager(String name)
public abstract void replaceNodeAttributes(String prefix, Map<String,Set<org.apache.hadoop.yarn.api.records.NodeAttribute>> nodeAttributeMapping) throws IOException
prefix
- node attribute prefixnodeAttributeMapping
- host name to a set of node attributes mappingIOException
- if failed to replace attributespublic abstract void addNodeAttributes(Map<String,Set<org.apache.hadoop.yarn.api.records.NodeAttribute>> nodeAttributeMapping) throws IOException
nodeAttributeMapping
- host name to a set of node attributes mapping.IOException
- io error occur.public abstract void removeNodeAttributes(Map<String,Set<org.apache.hadoop.yarn.api.records.NodeAttribute>> nodeAttributeMapping) throws IOException
nodeAttributeMapping
- host name to a set of node attributes mapping.IOException
- io error occur.public abstract Set<org.apache.hadoop.yarn.api.records.NodeAttribute> getClusterNodeAttributes(Set<String> prefix)
prefix
- set of prefix string's for which the attributes needs to
returnedpublic abstract Map<org.apache.hadoop.yarn.api.records.NodeAttributeKey,Map<String,AttributeValue>> getAttributesToNodes(Set<org.apache.hadoop.yarn.api.records.NodeAttributeKey> attributes)
attributes
- attributes set.public abstract Map<org.apache.hadoop.yarn.api.records.NodeAttribute,AttributeValue> getAttributesForNode(String hostName)
hostName
- host name.public abstract List<org.apache.hadoop.yarn.server.api.protocolrecords.NodeToAttributes> getNodeToAttributes(Set<String> prefix)
prefix
- filter prefix set.public abstract Map<String,Set<org.apache.hadoop.yarn.api.records.NodeAttribute>> getNodesToAttributes(Set<String> hostNames)
hostNames
- host names.public abstract void refreshNodeAttributesToScheduler(org.apache.hadoop.yarn.api.records.NodeId nodeId)
nodeId
- Node IdCopyright © 2008–2024 Apache Software Foundation. All rights reserved.