public class FairSchedulerPlanFollower extends AbstractSchedulerPlanFollower
clock, plans, scheduler
Constructor and Description |
---|
FairSchedulerPlanFollower() |
Modifier and Type | Method and Description |
---|---|
protected void |
addReservationQueue(String planQueueName,
Queue queue,
String currResId)
Add a new reservation queue for reservation currResId for this planQueue
|
protected void |
createDefaultReservationQueue(String planQueueName,
Queue queue,
String defReservationId)
Creates the default reservation queue for use when no reservation is
used for applications submitted to this planQueue
|
protected List<? extends Queue> |
getChildReservationQueues(Queue queue)
Get a list of reservation queues for this planQueue
|
protected Queue |
getPlanQueue(String planQueueName)
Get queue associated with reservable queue named
|
protected org.apache.hadoop.yarn.api.records.Resource |
getPlanResources(Plan plan,
Queue queue,
org.apache.hadoop.yarn.api.records.Resource clusterResources)
Get plan resources for this planQueue
|
protected String |
getReservationIdFromQueueName(String resQueueName) |
protected String |
getReservationQueueName(String planQueueName,
String reservationQueueName) |
protected org.apache.hadoop.yarn.api.records.Resource |
getReservationQueueResourceIfExists(Plan plan,
org.apache.hadoop.yarn.api.records.ReservationId reservationId)
Get reservation queue resources if it exists otherwise return null.
|
void |
init(org.apache.hadoop.yarn.util.Clock clock,
ResourceScheduler sched,
Collection<Plan> plans)
Init function that configures the PlanFollower, by providing:
|
cleanupExpiredQueues, getReservedResources, run, setPlans, setQueueEntitlement, sortByDelta, synchronizePlan
public void init(org.apache.hadoop.yarn.util.Clock clock, ResourceScheduler sched, Collection<Plan> plans)
PlanFollower
init
in interface PlanFollower
init
in class AbstractSchedulerPlanFollower
clock
- 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.protected Queue getPlanQueue(String planQueueName)
AbstractSchedulerPlanFollower
getPlanQueue
in class AbstractSchedulerPlanFollower
planQueueName
- Name of the reservable queueprotected List<? extends Queue> getChildReservationQueues(Queue queue)
AbstractSchedulerPlanFollower
getChildReservationQueues
in class AbstractSchedulerPlanFollower
protected void addReservationQueue(String planQueueName, Queue queue, String currResId)
AbstractSchedulerPlanFollower
addReservationQueue
in class AbstractSchedulerPlanFollower
protected void createDefaultReservationQueue(String planQueueName, Queue queue, String defReservationId)
AbstractSchedulerPlanFollower
createDefaultReservationQueue
in class AbstractSchedulerPlanFollower
protected org.apache.hadoop.yarn.api.records.Resource getPlanResources(Plan plan, Queue queue, org.apache.hadoop.yarn.api.records.Resource clusterResources)
AbstractSchedulerPlanFollower
getPlanResources
in class AbstractSchedulerPlanFollower
protected org.apache.hadoop.yarn.api.records.Resource getReservationQueueResourceIfExists(Plan plan, org.apache.hadoop.yarn.api.records.ReservationId reservationId)
AbstractSchedulerPlanFollower
getReservationQueueResourceIfExists
in class AbstractSchedulerPlanFollower
protected String getReservationQueueName(String planQueueName, String reservationQueueName)
getReservationQueueName
in class AbstractSchedulerPlanFollower
protected String getReservationIdFromQueueName(String resQueueName)
getReservationIdFromQueueName
in class AbstractSchedulerPlanFollower
Copyright © 2017 Apache Software Foundation. All Rights Reserved.