Class NodeAttribute
java.lang.Object
org.apache.hadoop.yarn.api.records.NodeAttribute
Node Attribute is a kind of a label which represents one of the attribute/feature of a Node. Its different from node partition label as resource guarantees across the queues will not be maintained for these type of labels.
A given Node can be mapped with any kind of attribute, few examples are HAS_SSD=true, JAVA_VERSION=JDK1.8, OS_TYPE=WINDOWS.
Its not compulsory for all the attributes to have value, empty string is the
default value of the NodeAttributeType.STRING
Node Attribute Prefix is used as namespace to segregate the attributes.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract NodeAttributeKeyabstract NodeAttributeTypeabstract Stringstatic NodeAttributenewInstance(String attributePrefix, String attributeName, NodeAttributeType attributeType, String attributeValue) static NodeAttributenewInstance(String attributeName, NodeAttributeType attributeType, String attributeValue) abstract voidsetAttributeKey(NodeAttributeKey attributeKey) abstract voidsetAttributeType(NodeAttributeType attributeType) abstract voidsetAttributeValue(String attributeValue)
-
Field Details
-
PREFIX_DISTRIBUTED
- See Also:
-
PREFIX_CENTRALIZED
- See Also:
-
-
Constructor Details
-
NodeAttribute
public NodeAttribute()
-
-
Method Details
-
newInstance
public static NodeAttribute newInstance(String attributeName, NodeAttributeType attributeType, String attributeValue) -
newInstance
public static NodeAttribute newInstance(String attributePrefix, String attributeName, NodeAttributeType attributeType, String attributeValue) -
getAttributeKey
-
setAttributeKey
-
getAttributeValue
-
setAttributeValue
-
getAttributeType
-
setAttributeType
-