Class NodeLabelsUtils
java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.nodelabels.NodeLabelsUtils
Node labels utilities.
-
Method Summary
Modifier and TypeMethodDescriptionconvertToStringSet(Set<org.apache.hadoop.yarn.api.records.NodeLabel> nodeLabels) 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 providedattributeNameslist.static voidverifyCentralizedNodeLabelConfEnabled(String operation, boolean isCentralizedNodeLabelConfiguration)
-
Method Details
-
convertToStringSet
-
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 providedattributeNameslist.- Parameters:
attributeNames- For this given list of attribute names get the cluster NodeAttributesclusterNodeAttributes- set of node Attributes- Returns:
- set of Node Attributes which maps to the give attributes names
-