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
Determines how to schedule opportunistic containers at the NodeManager,
i.e., whether or not to accept, queue, or reject a container run request.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDetermines whether or not to run a container by the queue capacity:YarnConfiguration.NM_OPPORTUNISTIC_CONTAINERS_MAX_QUEUE_LENGTH.Determines whether or not to run a container based on the amount of resource capacity the node has. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static OpportunisticContainersQueuePolicy[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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
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
-
DEFAULT
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-