public class MappingRuleValidationContextImpl extends Object implements MappingRuleValidationContext
Constructor and Description |
---|
MappingRuleValidationContextImpl(CapacitySchedulerQueueManager qm) |
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.
|
public MappingRuleValidationContextImpl(CapacitySchedulerQueueManager qm)
public boolean validateQueuePath(String queuePath) throws org.apache.hadoop.yarn.exceptions.YarnException
validateQueuePath
in interface MappingRuleValidationContext
queuePath
- The path to checkorg.apache.hadoop.yarn.exceptions.YarnException
- if the provided queue path is invalidpublic boolean isPathStatic(String queuePath) throws org.apache.hadoop.yarn.exceptions.YarnException
isPathStatic
in interface MappingRuleValidationContext
queuePath
- The path to checkorg.apache.hadoop.yarn.exceptions.YarnException
- if a path part is invalid (eg. empty)public void addVariable(String variable) throws org.apache.hadoop.yarn.exceptions.YarnException
addVariable
in interface MappingRuleValidationContext
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 thrownpublic void addImmutableVariable(String variable) throws org.apache.hadoop.yarn.exceptions.YarnException
addImmutableVariable
in interface MappingRuleValidationContext
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 thrownpublic Set<String> getVariables()
getVariables
in interface MappingRuleValidationContext
Copyright © 2008–2024 Apache Software Foundation. All rights reserved.