java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.nodelabels.NodeLabelsUtils

public final class NodeLabelsUtils extends Object
Node labels utilities.
  • Method Details

    • convertToStringSet

      public static Set<String> convertToStringSet(Set<org.apache.hadoop.yarn.api.records.NodeLabel> nodeLabels)
    • verifyCentralizedNodeLabelConfEnabled

      public static void verifyCentralizedNodeLabelConfEnabled(String operation, boolean isCentralizedNodeLabelConfiguration) throws IOException
      Throws:
      IOException
    • getNodeAttributesByName

      public static Set<org.apache.hadoop.yarn.api.records.NodeAttribute> getNodeAttributesByName(Set<String> attributeNames, Set<org.apache.hadoop.yarn.api.records.NodeAttribute> clusterNodeAttributes)
      Returns a set of node attributes whose name exists in the provided attributeNames list.
      Parameters:
      attributeNames - For this given list of attribute names get the cluster NodeAttributes
      clusterNodeAttributes - set of node Attributes
      Returns:
      set of Node Attributes which maps to the give attributes names