New Contributor
Posts: 2
Registered: ‎07-13-2017

Fixed fairshare in YARN Fair Scheduler

In YARN 2.7.3, "fixed fairshare" is not documented but implemenetd in Copied function signature below for convenience.


Use one example here to illustrate my understanding of "fixed fairshare", if ABC queue is define with "minResoures == 100; maxResoures == 100; weight == 0", we will have a fixed queue allocated 100 memory, not participating in instantanous fairshare (IFS); that is, (1) even when ABC queue is empty, its share of 100 memory will not be allocated to other active queue thru IFS; and (2) when ABC queue is not empty, it will not grab IFS shares from other empty queues.


Can folks from Cloudera confirm? Many thanks in advance.


Function signature copied from

   * Helper method to handle Schedulabes with fixed fairshares.
   * Returns the resources taken by fixed fairshare schedulables,
   * and adds the remaining to the passed nonFixedSchedulables.
  private static int handleFixedFairShares(
      Collection<? extends Schedulable> schedulables,
      Collection<Schedulable> nonFixedSchedulables,
      boolean isSteadyShare, ResourceType type) {

   * Get the fairshare for the {@link Schedulable} if it is fixed, -1 otherwise.
   * The fairshare is fixed if either the maxShare is 0, weight is 0,
   * or the Schedulable is not active for instantaneous fairshare.
  private static int getFairShareIfFixed(Schedulable sched,
      boolean isSteadyShare, ResourceType type) {