public interface MappingRuleValidationContext
Modifier and Type | Method and Description |
---|---|
void |
addImmutableVariable(String variable)
This method will add a known immutable variable to the validation context,
known variables can be used to determine if a path is static or dynamic.
|
void |
addVariable(String variable)
This method will add a known variable to the validation context, known
variables can be used to determine if a path is static or dynamic.
|
Set<String> |
getVariables()
This method will return all the known variables.
|
boolean |
isPathStatic(String queuePath)
Method to determine if the provided queue path contains any dynamic parts
A part is dynamic if a known variable is referenced in it.
|
boolean |
validateQueuePath(String queuePath)
This method should determine if the provided queue path can result in
a possible placement.
|
boolean validateQueuePath(String queuePath) throws org.apache.hadoop.yarn.exceptions.YarnException
queuePath
- The path to checkorg.apache.hadoop.yarn.exceptions.YarnException
- if the provided queue path is invalidboolean isPathStatic(String queuePath) throws org.apache.hadoop.yarn.exceptions.YarnException
queuePath
- The path to checkorg.apache.hadoop.yarn.exceptions.YarnException
- if invalid path parts are found (eg. empty)void addVariable(String variable) throws org.apache.hadoop.yarn.exceptions.YarnException
variable
- Name of the variableorg.apache.hadoop.yarn.exceptions.YarnException
- If the variable to be added has already added as an
immutable one, an exception is thrownvoid addImmutableVariable(String variable) throws org.apache.hadoop.yarn.exceptions.YarnException
variable
- Name of the immutable variableorg.apache.hadoop.yarn.exceptions.YarnException
- If the variable to be added has already added as a
regular, mutable variable an exception is thrownCopyright © 2008–2024 Apache Software Foundation. All rights reserved.