Class LegacyMappingRuleToJson
java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.placement.converter.LegacyMappingRuleToJson
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvert()This method will do the conversion based on the already set mapping rules.setAppNameMappingRules(String rules) This setter method is used to set the raw string format of the legacy application name mapping rules.setAppNameMappingRules(Collection<String> rules) This setter method is used to set the the application name mapping rules as a string collection, where each entry is one rule.setUserGroupMappingRules(String rules) This setter method is used to set the raw string format of the legacy user group mapping rules.setUserGroupMappingRules(Collection<String> rules) This setter method is used to set the the user group mapping rules as a string collection, where each entry is one rule.
-
Field Details
-
RULE_PART_DELIMITER
- See Also:
-
PREFIX_USER_MAPPING
- See Also:
-
PREFIX_GROUP_MAPPING
- See Also:
-
MATCHER_APPLICATION
- See Also:
-
MATCHER_USER
- See Also:
-
MAPPING_PRIMARY_GROUP
- See Also:
-
MAPPING_SECONDARY_GROUP
- See Also:
-
MAPPING_USER
- See Also:
-
JSON_MATCH_ALL
- See Also:
-
JSON_NODE_POLICY
- See Also:
-
JSON_NODE_PARENT_QUEUE
- See Also:
-
JSON_NODE_CUSTOM_PLACEMENT
- See Also:
-
JSON_NODE_MATCHES
- See Also:
-
-
Constructor Details
-
LegacyMappingRuleToJson
public LegacyMappingRuleToJson()
-
-
Method Details
-
setUserGroupMappingRules
This setter method is used to set the raw string format of the legacy user group mapping rules. This method expect a string formatted just like in the configuration file of the Capacity Scheduler. eg. u:bob:root.groups.%primary_group,u:%user:root.default- Parameters:
rules- The string containing ALL the UserGroup mapping rules in legacy format- Returns:
- This object for daisy chain support
-
setUserGroupMappingRules
This setter method is used to set the the user group mapping rules as a string collection, where each entry is one rule.- Parameters:
rules- One rule per entry- Returns:
- This object for daisy chain support
-
setAppNameMappingRules
This setter method is used to set the raw string format of the legacy application name mapping rules. This method expect a string formatted just like in the configuration file of the Capacity Scheduler. eg. mapreduce:root.apps.%application,%application:root.default- Parameters:
rules- The string containing ALL the application name mapping rules in legacy format- Returns:
- This object for daisy chain support
-
setAppNameMappingRules
This setter method is used to set the the application name mapping rules as a string collection, where each entry is one rule.- Parameters:
rules- One rule per entry- Returns:
- This object for daisy chain support
-
convert
This method will do the conversion based on the already set mapping rules. First the rules to be converted must be set via setAppNameMappingRules and setUserGroupMappingRules methods.- Returns:
- JSON Format of the provided mapping rules, null if no rules are set
-