@Public
@Unstable
public abstract class NodeAttribute
extends java.lang.Object
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.
| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
PREFIX_CENTRALIZED |
|
static java.lang.String |
PREFIX_DISTRIBUTED |
| Constructor | Description |
|---|---|
NodeAttribute() |
| Modifier and Type | Method | Description |
|---|---|---|
abstract NodeAttributeKey |
getAttributeKey() |
|
abstract NodeAttributeType |
getAttributeType() |
|
abstract java.lang.String |
getAttributeValue() |
|
static NodeAttribute |
newInstance(java.lang.String attributePrefix,
java.lang.String attributeName,
NodeAttributeType attributeType,
java.lang.String attributeValue) |
|
static NodeAttribute |
newInstance(java.lang.String attributeName,
NodeAttributeType attributeType,
java.lang.String attributeValue) |
|
abstract void |
setAttributeKey(NodeAttributeKey attributeKey) |
|
abstract void |
setAttributeType(NodeAttributeType attributeType) |
|
abstract void |
setAttributeValue(java.lang.String attributeValue) |
public static final java.lang.String PREFIX_DISTRIBUTED
public static final java.lang.String PREFIX_CENTRALIZED
public static NodeAttribute newInstance(java.lang.String attributeName, NodeAttributeType attributeType, java.lang.String attributeValue)
public static NodeAttribute newInstance(java.lang.String attributePrefix, java.lang.String attributeName, NodeAttributeType attributeType, java.lang.String attributeValue)
@Public @Unstable public abstract NodeAttributeKey getAttributeKey()
@Public @Unstable public abstract void setAttributeKey(NodeAttributeKey attributeKey)
@Public @Unstable public abstract java.lang.String getAttributeValue()
@Public @Unstable public abstract void setAttributeValue(java.lang.String attributeValue)
@Public @Unstable public abstract NodeAttributeType getAttributeType()
@Public @Unstable public abstract void setAttributeType(NodeAttributeType attributeType)
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.