Class FifoOrderingPolicy<S extends SchedulableEntity>
java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.scheduler.policy.AbstractComparatorOrderingPolicy<S>
org.apache.hadoop.yarn.server.resourcemanager.scheduler.policy.FifoOrderingPolicy<S>
- All Implemented Interfaces:
OrderingPolicy<S>
public class FifoOrderingPolicy<S extends SchedulableEntity>
extends AbstractComparatorOrderingPolicy<S>
An OrderingPolicy which orders SchedulableEntities by input order
-
Field Summary
Fields inherited from class org.apache.hadoop.yarn.server.resourcemanager.scheduler.policy.AbstractComparatorOrderingPolicy
comparator, entitiesToReorder, schedulableEntities -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidProvides 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 configuration name (which will be used to set ordering policy).getInfo()Return information regarding configuration and status.Methods inherited from class org.apache.hadoop.yarn.server.resourcemanager.scheduler.policy.AbstractComparatorOrderingPolicy
addAllSchedulableEntities, addSchedulableEntity, entityRequiresReordering, getAssignmentIterator, getComparator, getNumSchedulableEntities, getPreemptionIterator, getSchedulableEntities, removeSchedulableEntity, reorderSchedulableEntity, reorderScheduleEntities, updateSchedulingResourceUsage
-
Constructor Details
-
FifoOrderingPolicy
public FifoOrderingPolicy()
-
-
Method Details
-
configure
Description copied from interface:OrderingPolicyProvides configuration information for the policy from the scheduler configuration.- Specified by:
configurein interfaceOrderingPolicy<S extends SchedulableEntity>- Specified by:
configurein classAbstractComparatorOrderingPolicy<S extends SchedulableEntity>- Parameters:
conf- a map of scheduler configuration properties and values
-
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>- Specified by:
containerAllocatedin classAbstractComparatorOrderingPolicy<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>- Specified by:
containerReleasedin classAbstractComparatorOrderingPolicy<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>- Specified by:
demandUpdatedin classAbstractComparatorOrderingPolicy<S extends SchedulableEntity>- Parameters:
schedulableEntity- the updatedSchedulableEntity
-
getInfo
Description copied from interface:OrderingPolicyReturn information regarding configuration and status.- Specified by:
getInfoin interfaceOrderingPolicy<S extends SchedulableEntity>- Specified by:
getInfoin classAbstractComparatorOrderingPolicy<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>- Specified by:
getConfigNamein classAbstractComparatorOrderingPolicy<S extends SchedulableEntity>- Returns:
- configuration name
-