org.apache.hadoop.yarn.api.records

## Class NodeAttribute

- java.lang.Object
- - org.apache.hadoop.yarn.api.records.NodeAttribute

-     @InterfaceAudience.Public
       @InterfaceStability.Unstable
      public abstract class NodeAttribute
      extends 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.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `PREFIX_CENTRALIZED`
    `static String` | `PREFIX_DISTRIBUTED`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `NodeAttribute()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract NodeAttributeKey` | `getAttributeKey()`
    `abstract NodeAttributeType` | `getAttributeType()`
    `abstract String` | `getAttributeValue()`
    `static NodeAttribute` | `newInstance(String attributeName, NodeAttributeType attributeType, String attributeValue)`
    `static NodeAttribute` | `newInstance(String attributePrefix, String attributeName, NodeAttributeType attributeType, String attributeValue)`
    `abstract void` | `setAttributeKey(NodeAttributeKey attributeKey)`
    `abstract void` | `setAttributeType(NodeAttributeType attributeType)`
    `abstract void` | `setAttributeValue(String attributeValue)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### PREFIX_DISTRIBUTED

          public static final String PREFIX_DISTRIBUTED

      See Also:
        Constant Field Values

    - #### PREFIX_CENTRALIZED

          public static final String PREFIX_CENTRALIZED

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### NodeAttribute

          public NodeAttribute()

  - ### Method Detail

    - #### 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

          @InterfaceAudience.Public
           @InterfaceStability.Unstable
          public abstract NodeAttributeKey getAttributeKey()

    - #### setAttributeKey

          @InterfaceAudience.Public
           @InterfaceStability.Unstable
          public abstract void setAttributeKey(NodeAttributeKey attributeKey)

    - #### getAttributeValue

          @InterfaceAudience.Public
           @InterfaceStability.Unstable
          public abstract String getAttributeValue()

    - #### setAttributeValue

          @InterfaceAudience.Public
           @InterfaceStability.Unstable
          public abstract void setAttributeValue(String attributeValue)

    - #### getAttributeType

          @InterfaceAudience.Public
           @InterfaceStability.Unstable
          public abstract NodeAttributeType getAttributeType()

    - #### setAttributeType

          @InterfaceAudience.Public
           @InterfaceStability.Unstable
          public abstract void setAttributeType(NodeAttributeType attributeType)

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.