java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.scheduler.policy.AbstractComparatorOrderingPolicy<S>
org.apache.hadoop.yarn.server.resourcemanager.scheduler.policy.FairOrderingPolicy<S>
All Implemented Interfaces:
OrderingPolicy<S>

public class FairOrderingPolicy<S extends SchedulableEntity> extends AbstractComparatorOrderingPolicy<S>
FairOrderingPolicy comparison goes through following steps. 1.Fairness based comparison. SchedulableEntities with lesser usage would be preferred when compared to another. If sizedBasedWeight is set to true then an application with high demand may be prioritized ahead of an application with less usage. This is to offset the tendency to favor small apps, which could result in starvation for large apps if many small ones enter and leave the queue continuously (optional, default false) 2. Compare using job submit time. SchedulableEntities submitted earlier would be preferred than later. 3. Compare demands. SchedulableEntities without resource demand get lower priority than ones which have demands.