org.apache.hadoop.yarn.server.resourcemanager.reservation
Class SimpleCapacityReplanner
java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.reservation.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).
|
Method Summary |
void |
init(String planQueueName,
org.apache.hadoop.conf.Configuration conf)
Initialize the replanner |
void |
plan(Plan plan,
List<org.apache.hadoop.yarn.api.records.ReservationDefinition> contracts)
Update the existing Plan, by adding/removing/updating existing
reservations, and adding a subset of the reservation requests in the
contracts parameter. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleCapacityReplanner
public SimpleCapacityReplanner()
init
public void init(String planQueueName,
org.apache.hadoop.conf.Configuration conf)
- Description copied from interface:
Planner
- Initialize the replanner
- Specified by:
init in interface Planner
- Parameters:
planQueueName - the name of the queue for this planconf - 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 replancontracts - the list of reservation requests
- Throws:
PlanningException
Copyright © 2014 Apache Software Foundation. All Rights Reserved.