Enum Class OpportunisticContainersQueuePolicy

java.lang.Object
java.lang.Enum<OpportunisticContainersQueuePolicy>
org.apache.hadoop.yarn.server.nodemanager.containermanager.scheduler.OpportunisticContainersQueuePolicy
All Implemented Interfaces:
Serializable, Comparable<OpportunisticContainersQueuePolicy>, Constable

public enum OpportunisticContainersQueuePolicy extends Enum<OpportunisticContainersQueuePolicy>
Determines how to schedule opportunistic containers at the NodeManager, i.e., whether or not to accept, queue, or reject a container run request.
  • Enum Constant Details

    • BY_QUEUE_LEN

      public static final OpportunisticContainersQueuePolicy BY_QUEUE_LEN
      Determines whether or not to run a container by the queue capacity: YarnConfiguration.NM_OPPORTUNISTIC_CONTAINERS_MAX_QUEUE_LENGTH. If there's enough capacity in the queue, queues the container, otherwise rejects it.
    • BY_RESOURCES

      public static final OpportunisticContainersQueuePolicy BY_RESOURCES
      Determines whether or not to run a container based on the amount of resource capacity the node has. Sums up the resources running + already queued at the node, compares it with the total capacity of the node, and accepts the new container only if the computed resources above + resources used by the container is less than or equal to the node capacity.
  • Field Details

  • Method Details

    • values

      public static OpportunisticContainersQueuePolicy[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static OpportunisticContainersQueuePolicy valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null