java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.policies.ComputeFairShares

public final class ComputeFairShares extends Object
Contains logic for computing the fair shares. A Schedulable's fair share is Resource it is entitled to, independent of the current demands and allocations on the cluster. A Schedulable whose resource consumption lies at or below its fair share will never have its containers preempted.
  • Method Details

    • computeShares

      public static void computeShares(Collection<? extends Schedulable> schedulables, org.apache.hadoop.yarn.api.records.Resource totalResources, String type)
      Compute fair share of the given schedulables.Fair share is an allocation of shares considering only active schedulables ie schedulables which have running apps.
      Parameters:
      schedulables - given schedulables.
      totalResources - totalResources.
      type - type of the resource.
    • computeSteadyShares

      public static void computeSteadyShares(Collection<? extends FSQueue> queues, org.apache.hadoop.yarn.api.records.Resource totalResources, String type)
      Compute the steady fair share of the given queues. The steady fair share is an allocation of shares considering all queues, i.e., active and inactive.
      Parameters:
      queues - FSQueues whose shares are to be updated.
      totalResources - totalResources.
      type - type of the resource.