Class SimpleCapacityReplanner
java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.reservation.planning.SimpleCapacityReplanner
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidinit(String planQueueName, ReservationSchedulerConfiguration conf) Initialize the replannervoidUpdate the existingPlan, by adding/removing/updating existing reservations, and adding a subset of the reservation requests in the contracts parameter.
-
Constructor Details
-
SimpleCapacityReplanner
public SimpleCapacityReplanner()
-
-
Method Details
-
init
Description copied from interface:PlannerInitialize the replanner -
plan
public void plan(Plan plan, List<org.apache.hadoop.yarn.api.records.ReservationDefinition> contracts) throws PlanningException Description copied from interface:PlannerUpdate the existingPlan, by adding/removing/updating existing reservations, and adding a subset of the reservation requests in the contracts parameter.- Specified by:
planin interfacePlanner- Parameters:
plan- thePlanto replancontracts- the list of reservation requests- Throws:
PlanningException- if operation is unsuccessful
-