java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.reservation.planning.SimpleCapacityReplanner
All Implemented Interfaces:
Planner

public class SimpleCapacityReplanner extends Object implements Planner
This (re)planner scan a period of time from now to a maximum time window (or the end of the last session, whichever comes first) checking the overall capacity is not violated. It greedily removes sessions in reversed order of acceptance (latest accepted is the first removed).
  • Constructor Details

    • SimpleCapacityReplanner

      public SimpleCapacityReplanner()
  • Method Details

    • init

      public void init(String planQueueName, ReservationSchedulerConfiguration conf)
      Description copied from interface: Planner
      Initialize the replanner
      Specified by:
      init in interface Planner
      Parameters:
      planQueueName - the name of the queue for this plan
      conf - the scheduler configuration
    • plan

      public void plan(Plan plan, List<org.apache.hadoop.yarn.api.records.ReservationDefinition> contracts) throws PlanningException
      Description copied from interface: Planner
      Update the existing Plan, by adding/removing/updating existing reservations, and adding a subset of the reservation requests in the contracts parameter.
      Specified by:
      plan in interface Planner
      Parameters:
      plan - the Plan to replan
      contracts - the list of reservation requests
      Throws:
      PlanningException - if operation is unsuccessful