|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.yarn.server.resourcemanager.reservation.CapacitySchedulerPlanFollower
public class CapacitySchedulerPlanFollower
This class implements a PlanFollower. This is invoked on a timer, and
it is in charge to publish the state of the Plans to the underlying
CapacityScheduler. This implementation does so, by
adding/removing/resizing leaf queues in the scheduler, thus affecting the
dynamic behavior of the scheduler in a way that is consistent with the
content of the plan. It also updates the plan's view on how much resources
are available in the cluster.
This implementation of PlanFollower is relatively stateless, and it can
synchronize schedulers and Plans that have arbitrary changes (performing set
differences among existing queues). This makes it resilient to frequency of
synchronization, and RM restart issues (no "catch up" is necessary).
| Constructor Summary | |
|---|---|
CapacitySchedulerPlanFollower()
|
|
| Method Summary | |
|---|---|
void |
init(org.apache.hadoop.yarn.util.Clock clock,
ResourceScheduler sched,
Collection<Plan> plans)
Init function that configures the PlanFollower, by providing: |
void |
run()
|
void |
setPlans(Collection<Plan> plans)
Setter for the list of plans. |
void |
synchronizePlan(Plan plan)
The function performing the actual synchronization operation for a given Plan. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CapacitySchedulerPlanFollower()
| Method Detail |
|---|
public void init(org.apache.hadoop.yarn.util.Clock clock,
ResourceScheduler sched,
Collection<Plan> plans)
PlanFollower
init in interface PlanFollowerclock - a reference to the system clock.sched - a reference to the underlying schedulerplans - references to the plans we should keep synchronized at every
time tick.public void run()
run in interface Runnablepublic void synchronizePlan(Plan plan)
PlanFollower
synchronizePlan in interface PlanFollowerplan - the Plan to synchronizepublic void setPlans(Collection<Plan> plans)
PlanFollower
setPlans in interface PlanFollowerplans - the collection of Plans we operate on at every time tick.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||