Class MappingRuleActions.PlaceToQueueAction
java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.placement.csmappingrule.MappingRuleActionBase
org.apache.hadoop.yarn.server.resourcemanager.placement.csmappingrule.MappingRuleActions.PlaceToQueueAction
- All Implemented Interfaces:
MappingRuleAction
- Enclosing class:
- MappingRuleActions
PlaceToQueueAction represents a placement action, contains the pattern of
the queue name or path in which the path variables will be substituted
with the variable context's respective values.
-
Method Summary
Modifier and TypeMethodDescriptionexecute(VariableContext variables) This method is the main logic of the action, it will replace all the variables in the queuePattern with their respective values, then returns a placementResult with the final queue name.toString()voidThis method is responsible for config validation, we use the validation context's helper method to validate if our path is valid.Methods inherited from class org.apache.hadoop.yarn.server.resourcemanager.placement.csmappingrule.MappingRuleActionBase
getFallback, setFallbackDefaultPlacement, setFallbackReject, setFallbackSkip
-
Method Details
-
execute
This method is the main logic of the action, it will replace all the variables in the queuePattern with their respective values, then returns a placementResult with the final queue name.- Specified by:
executein interfaceMappingRuleAction- Specified by:
executein classMappingRuleActionBase- Parameters:
variables- The variable context, which contains all the variables- Returns:
- The result of the action
-
validate
public void validate(MappingRuleValidationContext ctx) throws org.apache.hadoop.yarn.exceptions.YarnException This method is responsible for config validation, we use the validation context's helper method to validate if our path is valid. From the point of the action all paths are valid, that is why we need to use an external component which is aware of the queue structure and know when a queue placement is valid in that context. This way this calass can stay independent of the capacity scheduler's internal queue placement logic, yet it is able to obey it's rules.- Parameters:
ctx- Validation context with all the necessary objects and helper methods required during validation- Throws:
org.apache.hadoop.yarn.exceptions.YarnException- is thrown on validation error
-
toString
-