MappingRuleValidationContextpublic class MappingRuleValidationContextImpl extends java.lang.Object implements MappingRuleValidationContext
| Constructor | Description |
|---|---|
MappingRuleValidationContextImpl(CapacitySchedulerQueueManager qm) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addImmutableVariable(java.lang.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(java.lang.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.
|
java.util.Set<java.lang.String> |
getVariables() |
This method will return all the known variables.
|
boolean |
isPathStatic(java.lang.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(java.lang.String queuePath) |
This method should determine if the provided queue path can result in
a possible placement.
|
public MappingRuleValidationContextImpl(CapacitySchedulerQueueManager qm)
public boolean validateQueuePath(java.lang.String queuePath)
throws org.apache.hadoop.yarn.exceptions.YarnException
validateQueuePath in interface MappingRuleValidationContextqueuePath - The path to checkorg.apache.hadoop.yarn.exceptions.YarnException - if the provided queue path is invalidpublic boolean isPathStatic(java.lang.String queuePath)
throws org.apache.hadoop.yarn.exceptions.YarnException
isPathStatic in interface MappingRuleValidationContextqueuePath - The path to checkorg.apache.hadoop.yarn.exceptions.YarnException - if a path part is invalid (eg. empty)public void addVariable(java.lang.String variable)
throws org.apache.hadoop.yarn.exceptions.YarnException
addVariable in interface MappingRuleValidationContextvariable - 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(java.lang.String variable)
throws org.apache.hadoop.yarn.exceptions.YarnException
addImmutableVariable in interface MappingRuleValidationContextvariable - 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 java.util.Set<java.lang.String> getVariables()
getVariables in interface MappingRuleValidationContextCopyright © 2008–2025 Apache Software Foundation. All rights reserved.