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
IOException
public static void checkAndThrowAttributeName(String attributeName) throws IOException
IOException
public static void checkAndThrowAttributeValue(String value) throws IOException
IOException
public static void checkAndThrowAttributePrefix(String prefix) throws IOException
IOException
public static void validateNodeAttributes(Set<org.apache.hadoop.yarn.api.records.NodeAttribute> attributeSet) throws IOException
attributeSet
- node attribute set.IOException
- io error occur.public 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 prefixpublic static boolean isNodeAttributesEquals(Set<org.apache.hadoop.yarn.api.records.NodeAttribute> leftNodeAttributes, Set<org.apache.hadoop.yarn.api.records.NodeAttribute> rightNodeAttributes)
leftNodeAttributes
- left node attribute.rightNodeAttributes
- right node attribute.Copyright © 2008–2024 Apache Software Foundation. All rights reserved.