Class FifoOrderingPolicyForPendingApps<S extends SchedulableEntity>
java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.scheduler.policy.AbstractComparatorOrderingPolicy<S>
org.apache.hadoop.yarn.server.resourcemanager.scheduler.policy.FifoOrderingPolicyForPendingApps<S>
- All Implemented Interfaces:
OrderingPolicy<S>
public class FifoOrderingPolicyForPendingApps<S extends SchedulableEntity>
extends AbstractComparatorOrderingPolicy<S>
This ordering policy is used for pending applications only.
An OrderingPolicy which orders SchedulableEntities by
- Recovering application
- Priority of an application
- Input order
Example : If schedulableEntities with E1(true,1,1) E2(true,2,2) E3(true,3,3) E4(false,4,4) E5(false,4,5) are added. The ordering policy assignment iterator is in the order of E3(true,3,3) E2(true,2,2) E1(true,1,1) E5(false,5,5) E4(false,4,4)
-
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
-
FifoOrderingPolicyForPendingApps
public FifoOrderingPolicyForPendingApps()
-
-
Method Details
-
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
-
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
-