java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.placement.csmappingrule.MappingRuleResult

public final class MappingRuleResult extends Object
This class represents the outcome of an action.
  • Method Details

    • getQueue

      public String 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

      public void updateNormalizedQueue(String normalizedQueueName)
      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

      public String 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

      public MappingRuleResultType getResult()
      Returns the type of the result.
      Returns:
      the type of the result.
    • createPlacementResult

      public static MappingRuleResult createPlacementResult(String queue, boolean allowCreate)
      Generator method for place results.
      Parameters:
      queue - The name of the queue in which we shall place the application
      allowCreate - Flag to indicate if the placement rule is allowed to create a queue if possible.
      Returns:
      The generated MappingRuleResult
    • createRejectResult

      public static MappingRuleResult createRejectResult()
      Generator method for reject results.
      Returns:
      The generated MappingRuleResult
    • createSkipResult

      public static MappingRuleResult createSkipResult()
      Generator method for skip results.
      Returns:
      The generated MappingRuleResult
    • createDefaultPlacementResult

      public static 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

      public String toString()
      Returns the string representation of the object.
      Overrides:
      toString in class Object
      Returns:
      the string representation of the object