public final class NodeLabelUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
checkAndThrowAttributeName(String attributeName) |
static void |
checkAndThrowAttributePrefix(String prefix) |
static void |
checkAndThrowAttributeValue(String value) |
static void |
checkAndThrowLabelName(String label) |
static Set<org.apache.hadoop.yarn.api.records.NodeAttribute> |
filterAttributesByPrefix(Set<org.apache.hadoop.yarn.api.records.NodeAttribute> attributeSet,
String prefix)
Filter a set of node attributes by a given prefix.
|
static boolean |
isNodeAttributesEquals(Set<org.apache.hadoop.yarn.api.records.NodeAttribute> leftNodeAttributes,
Set<org.apache.hadoop.yarn.api.records.NodeAttribute> rightNodeAttributes)
Are these two input node attributes the same.
|
static void |
validateNodeAttributes(Set<org.apache.hadoop.yarn.api.records.NodeAttribute> attributeSet)
Validate if a given set of attributes are valid.
|
public static void checkAndThrowLabelName(String label) throws IOException
IOExceptionpublic static void checkAndThrowAttributeName(String attributeName) throws IOException
IOExceptionpublic static void checkAndThrowAttributeValue(String value) throws IOException
IOExceptionpublic static void checkAndThrowAttributePrefix(String prefix) throws IOException
IOExceptionpublic static void validateNodeAttributes(Set<org.apache.hadoop.yarn.api.records.NodeAttribute> attributeSet) throws IOException
attributeSet - IOExceptionpublic static Set<org.apache.hadoop.yarn.api.records.NodeAttribute> filterAttributesByPrefix(Set<org.apache.hadoop.yarn.api.records.NodeAttribute> attributeSet, String prefix)
attributeSet - node attribute setprefix - node attribute prefixCopyright © 2008–2023 Apache Software Foundation. All rights reserved.