org.apache.hadoop.yarn.api.records

## Enum RejectionReason

- java.lang.Object
- - java.lang.Enum<RejectionReason>
  - - org.apache.hadoop.yarn.api.records.RejectionReason

- All Implemented Interfaces:
    Serializable, Comparable<RejectionReason>

      @InterfaceAudience.Public
       @InterfaceStability.Unstable
      public enum RejectionReason
      extends Enum<RejectionReason>

  Reason for rejecting a Scheduling Request.

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `COULD_NOT_PLACE_ON_NODE` This is used to indicate a possible constraint violation.
    `COULD_NOT_SCHEDULE_ON_NODE` This is used to indicate when after the Algorithm has placed a Scheduling Request at a node, but the commit failed because the Queue has no capacity etc.

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static RejectionReason` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static RejectionReason[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### COULD_NOT_PLACE_ON_NODE

          public static final RejectionReason COULD_NOT_PLACE_ON_NODE

      This is used to indicate a possible constraint violation. For eg. If the App requested anti-affinity across 5 container requests, but only 4 nodes exist. Another eg. could be if tag A has affinity with tag B and tag B has affinity with tag C, but tag A has anti-affinity with tag C, all at a rack scope - and only 1 rack exists. Essentially all situations where the Algorithm cannot assign a Node to SchedulingRequest.

    - #### COULD_NOT_SCHEDULE_ON_NODE

          public static final RejectionReason COULD_NOT_SCHEDULE_ON_NODE

      This is used to indicate when after the Algorithm has placed a Scheduling Request at a node, but the commit failed because the Queue has no capacity etc. This can be a transient situation.

  - ### Method Detail

    - #### values

          public static RejectionReason[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (RejectionReason c : RejectionReason.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static RejectionReason valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `IllegalArgumentException` - if this enum type has no constant with the specified name
        `NullPointerException` - if the argument is null

Copyright © 2022 Apache Software Foundation. All rights reserved.