public class MappingRule
extends java.lang.Object
| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
APPLICATION_MAPPING |
|
static java.lang.String |
GROUP_MAPPING |
|
static java.lang.String |
USER_MAPPING |
| Constructor | Description |
|---|---|
MappingRule(MappingRuleMatcher matcher,
MappingRuleAction action) |
| Modifier and Type | Method | Description |
|---|---|---|
static MappingRule |
createLegacyRule(java.lang.String source,
java.lang.String path) |
Creates a MappingRule object from the legacy style configuration.
|
static MappingRule |
createLegacyRule(java.lang.String type,
java.lang.String source,
java.lang.String path) |
Creates a MappingRule object from the legacy style configuration.
|
MappingRuleResult |
evaluate(VariableContext variables) |
This method evaluates the rule, and returns the MappingRuleResult, if
the rule matches, skip action otherwise.
|
MappingRuleResult |
getFallback() |
Returns the associated action's fallback.
|
java.lang.String |
toString() |
|
void |
validate(MappingRuleValidationContext ctx) |
public static final java.lang.String USER_MAPPING
public static final java.lang.String GROUP_MAPPING
public static final java.lang.String APPLICATION_MAPPING
public MappingRule(MappingRuleMatcher matcher, MappingRuleAction action)
public MappingRuleResult evaluate(VariableContext variables)
variables - The variable context, which contains all the variablespublic MappingRuleResult getFallback()
public static MappingRule createLegacyRule(java.lang.String source, java.lang.String path)
source - This part of the rule determines which applications the rule
will be appliedpath - The path where the application is to be placedpublic static MappingRule createLegacyRule(java.lang.String type, java.lang.String source, java.lang.String path)
type - The type of the rule, can be
'u' for user mapping, 'g' for group mapping or
'a' for application mappingsource - This part of the rule determines which submissions this rule
should apply to (eg. if type is 'u', source will match
against the user name)path - The path where the application is to be placedpublic void validate(MappingRuleValidationContext ctx) throws org.apache.hadoop.yarn.exceptions.YarnException
org.apache.hadoop.yarn.exceptions.YarnExceptionpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2008–2025 Apache Software Foundation. All rights reserved.