Class MappingRuleResult
java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.placement.csmappingrule.MappingRuleResult
This class represents the outcome of an action.
-
Method Summary
Modifier and TypeMethodDescriptionstatic MappingRuleResultGenerator method for default placement results.static MappingRuleResultcreatePlacementResult(String queue, boolean allowCreate) Generator method for place results.static MappingRuleResultGenerator method for reject results.static MappingRuleResultGenerator method for skip results.This method returns the normalized name of the result queue.getQueue()This method returns the result queue.Returns the type of the result.booleanThe method returns true if the result queue should be created when it does not exist yet.toString()Returns the string representation of the object.voidupdateNormalizedQueue(String normalizedQueueName) External interface for setting the normalized version of the queue.
-
Method Details
-
getQueue
This method returns the result queue. Currently only makes sense when result == PLACE.- Returns:
- the queue this result is about
-
isCreateAllowed
public boolean isCreateAllowed()The method returns true if the result queue should be created when it does not exist yet.- Returns:
- true if non-existent queues should be created
-
updateNormalizedQueue
External interface for setting the normalized version of the queue. This class cannot normalize on it's own, but provides a way to store the normalized name of the target queue.- Parameters:
normalizedQueueName- The normalized name of the queue
-
getNormalizedQueue
This method returns the normalized name of the result queue. Currently only makes sense when result == PLACE Normalized value must be set externally, this class cannot normalize it just provides a way to store the normalized name of a queue- Returns:
- the queue name this result is about
-
getResult
Returns the type of the result.- Returns:
- the type of the result.
-
createPlacementResult
Generator method for place results.- Parameters:
queue- The name of the queue in which we shall place the applicationallowCreate- Flag to indicate if the placement rule is allowed to create a queue if possible.- Returns:
- The generated MappingRuleResult
-
createRejectResult
Generator method for reject results.- Returns:
- The generated MappingRuleResult
-
createSkipResult
Generator method for skip results.- Returns:
- The generated MappingRuleResult
-
createDefaultPlacementResult
Generator method for default placement results. It is a specialized placement result which will only use the "%default" as a queue name.- Returns:
- The generated MappingRuleResult
-
toString
Returns the string representation of the object.
-