Class FifoOrderingPolicyWithExclusivePartitions<S extends SchedulableEntity>
java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.scheduler.policy.FifoOrderingPolicyWithExclusivePartitions<S>
- All Implemented Interfaces:
OrderingPolicy<S>
public class FifoOrderingPolicyWithExclusivePartitions<S extends SchedulableEntity>
extends Object
implements OrderingPolicy<S>
Similar to
FifoOrderingPolicy, but with separate ordering policies
for each partition in
yarn.scheduler.capacity.<queue-path>.ordering-policy.exclusive-enforced-partitions.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a collection ofSchedulableEntityobjects to be managed for allocation and preemption ordering.voidAdd aSchedulableEntityto be managed for allocation and preemption ordering.voidProvides configuration information for the policy from the scheduler configuration.voidcontainerAllocated(S schedulableEntity, RMContainer r) Notify theOrderingPolicythat theSchedulableEntityhas been allocated the givenRMContainer, enabling theOrderingPolicyto take appropriate action.voidcontainerReleased(S schedulableEntity, RMContainer r) Notify theOrderingPolicythat theSchedulableEntityhas released the givenRMContainer, enabling theOrderingPolicyto take appropriate action.voiddemandUpdated(S schedulableEntity) Notify theOrderingPolicythat the demand for theSchedulableEntityhas been updated, enabling theOrderingPolicyto reorder theSchedulableEntityif needed.Return an iterator over the collection ofSchedulableEntityobjects which orders them for container assignment.Return configuration name (which will be used to set ordering policy).getInfo()Return information regarding configuration and status.intGet the number ofSchedulableEntityobjects managed for allocation and preemption ordering.Return an iterator over the collection ofSchedulableEntityobjects which orders them for preemption.Get the collection ofSchedulableEntityObjects which are managed by this OrderingPolicy - should include processes returned by the Assignment and Preemption iterator with no guarantees regarding order.booleanRemove aSchedulableEntityfrom management for allocation and preemption ordering.
-
Constructor Details
-
FifoOrderingPolicyWithExclusivePartitions
public FifoOrderingPolicyWithExclusivePartitions()
-
-
Method Details
-
getSchedulableEntities
Description copied from interface:OrderingPolicyGet the collection ofSchedulableEntityObjects which are managed by this OrderingPolicy - should include processes returned by the Assignment and Preemption iterator with no guarantees regarding order.- Specified by:
getSchedulableEntitiesin interfaceOrderingPolicy<S extends SchedulableEntity>- Returns:
- a collection of
SchedulableEntityobjects
-
getAssignmentIterator
Description copied from interface:OrderingPolicyReturn an iterator over the collection ofSchedulableEntityobjects which orders them for container assignment.- Specified by:
getAssignmentIteratorin interfaceOrderingPolicy<S extends SchedulableEntity>- Parameters:
sel- theIteratorSelectorto filter with- Returns:
- an iterator over the collection of
SchedulableEntityobjects
-
getPreemptionIterator
Description copied from interface:OrderingPolicyReturn an iterator over the collection ofSchedulableEntityobjects which orders them for preemption.- Specified by:
getPreemptionIteratorin interfaceOrderingPolicy<S extends SchedulableEntity>- Returns:
- an iterator over the collection of
SchedulableEntity
-
addSchedulableEntity
Description copied from interface:OrderingPolicyAdd aSchedulableEntityto be managed for allocation and preemption ordering.- Specified by:
addSchedulableEntityin interfaceOrderingPolicy<S extends SchedulableEntity>- Parameters:
s- theSchedulableEntityto add
-
removeSchedulableEntity
Description copied from interface:OrderingPolicyRemove aSchedulableEntityfrom management for allocation and preemption ordering.- Specified by:
removeSchedulableEntityin interfaceOrderingPolicy<S extends SchedulableEntity>- Parameters:
s- theSchedulableEntityto remove- Returns:
- whether the
SchedulableEntitywas present before this operation
-
addAllSchedulableEntities
Description copied from interface:OrderingPolicyAdd a collection ofSchedulableEntityobjects to be managed for allocation and preemption ordering.- Specified by:
addAllSchedulableEntitiesin interfaceOrderingPolicy<S extends SchedulableEntity>- Parameters:
sc- the collection ofSchedulableEntityobjects to add
-
getNumSchedulableEntities
public int getNumSchedulableEntities()Description copied from interface:OrderingPolicyGet the number ofSchedulableEntityobjects managed for allocation and preemption ordering.- Specified by:
getNumSchedulableEntitiesin interfaceOrderingPolicy<S extends SchedulableEntity>- Returns:
- the number of
SchedulableEntityobjects
-
containerAllocated
Description copied from interface:OrderingPolicyNotify theOrderingPolicythat theSchedulableEntityhas been allocated the givenRMContainer, enabling theOrderingPolicyto take appropriate action. Depending on the comparator, a reordering of theSchedulableEntitymay be required.- Specified by:
containerAllocatedin interfaceOrderingPolicy<S extends SchedulableEntity>- Parameters:
schedulableEntity- theSchedulableEntityr- the allocatedRMContainer
-
containerReleased
Description copied from interface:OrderingPolicyNotify theOrderingPolicythat theSchedulableEntityhas released the givenRMContainer, enabling theOrderingPolicyto take appropriate action. Depending on the comparator, a reordering of theSchedulableEntitymay be required.- Specified by:
containerReleasedin interfaceOrderingPolicy<S extends SchedulableEntity>- Parameters:
schedulableEntity- theSchedulableEntityr- the releasedRMContainer
-
demandUpdated
Description copied from interface:OrderingPolicyNotify theOrderingPolicythat the demand for theSchedulableEntityhas been updated, enabling theOrderingPolicyto reorder theSchedulableEntityif needed.- Specified by:
demandUpdatedin interfaceOrderingPolicy<S extends SchedulableEntity>- Parameters:
schedulableEntity- the updatedSchedulableEntity
-
configure
Description copied from interface:OrderingPolicyProvides configuration information for the policy from the scheduler configuration.- Specified by:
configurein interfaceOrderingPolicy<S extends SchedulableEntity>- Parameters:
conf- a map of scheduler configuration properties and values
-
getInfo
Description copied from interface:OrderingPolicyReturn information regarding configuration and status.- Specified by:
getInfoin interfaceOrderingPolicy<S extends SchedulableEntity>- Returns:
- configuration and status information
-
getConfigName
Description copied from interface:OrderingPolicyReturn configuration name (which will be used to set ordering policy).- Specified by:
getConfigNamein interfaceOrderingPolicy<S extends SchedulableEntity>- Returns:
- configuration name
-