|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.service.AbstractService
org.apache.hadoop.yarn.server.resourcemanager.reservation.AbstractReservationSystem
@InterfaceAudience.LimitedPrivate(value="yarn") @InterfaceStability.Unstable public abstract class AbstractReservationSystem
This is the implementation of ReservationSystem based on the
ResourceScheduler
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.apache.hadoop.service.Service |
|---|
org.apache.hadoop.service.Service.STATE |
| Field Summary | |
|---|---|
protected org.apache.hadoop.conf.Configuration |
conf
|
protected long |
planStepSize
|
| Constructor Summary | |
|---|---|
AbstractReservationSystem(String name)
Construct the service. |
|
| Method Summary | |
|---|---|
protected abstract SharingPolicy |
getAdmissionPolicy(String queueName)
|
protected abstract ReservationAgent |
getAgent(String queueName)
|
Map<String,Plan> |
getAllPlans()
Return a map containing all the plans known to this ReservationSystem (useful for UI) |
static String |
getDefaultReservationSystem(ResourceScheduler scheduler)
Get the default reservation system corresponding to the scheduler |
org.apache.hadoop.yarn.api.records.ReservationId |
getNewReservationId()
Get a new unique ReservationId. |
Plan |
getPlan(String planName)
Get an existing Plan that has been initialized. |
long |
getPlanFollowerTimeStep()
Return the time step (ms) at which the PlanFollower is invoked |
String |
getQueueForReservation(org.apache.hadoop.yarn.api.records.ReservationId reservationId)
Get the Queue that an existing ReservationId is associated
with. |
protected abstract Planner |
getReplanner(String planQueueName)
|
protected abstract Plan |
initializePlan(String planQueueName)
|
void |
reinitialize(org.apache.hadoop.conf.Configuration conf,
RMContext rmContext)
Re-initialize the ReservationSystem. |
void |
serviceInit(org.apache.hadoop.conf.Configuration conf)
|
void |
serviceStart()
|
void |
serviceStop()
|
void |
setQueueForReservation(org.apache.hadoop.yarn.api.records.ReservationId reservationId,
String queueName)
Set the Queue that an existing ReservationId should be
associated with. |
void |
setRMContext(RMContext rmContext)
Set RMContext for ReservationSystem. |
void |
synchronizePlan(String planName)
Invokes PlanFollower to synchronize the specified Plan with
the ResourceScheduler |
| Methods inherited from class org.apache.hadoop.service.AbstractService |
|---|
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected org.apache.hadoop.conf.Configuration conf
protected long planStepSize
| Constructor Detail |
|---|
public AbstractReservationSystem(String name)
name - service name| Method Detail |
|---|
public void setRMContext(RMContext rmContext)
ReservationSystemReservationSystem. This method should be called
immediately after instantiating a reservation system once.
setRMContext in interface ReservationSystemrmContext - created by ResourceManager
public void reinitialize(org.apache.hadoop.conf.Configuration conf,
RMContext rmContext)
throws org.apache.hadoop.yarn.exceptions.YarnException
ReservationSystemReservationSystem.
reinitialize in interface ReservationSystemconf - configurationrmContext - current context of the ResourceManager
org.apache.hadoop.yarn.exceptions.YarnExceptionpublic Plan getPlan(String planName)
ReservationSystemPlan that has been initialized.
getPlan in interface ReservationSystemplanName - the name of the Plan
Plan identified by namepublic long getPlanFollowerTimeStep()
ReservationSystemPlanFollower is invoked
getPlanFollowerTimeStep in interface ReservationSystempublic void synchronizePlan(String planName)
ReservationSystemPlanFollower to synchronize the specified Plan with
the ResourceScheduler
synchronizePlan in interface ReservationSystemplanName - the name of the Plan to be synchronized
public void serviceInit(org.apache.hadoop.conf.Configuration conf)
throws Exception
serviceInit in class org.apache.hadoop.service.AbstractServiceException
public void serviceStart()
throws Exception
serviceStart in class org.apache.hadoop.service.AbstractServiceExceptionpublic void serviceStop()
serviceStop in class org.apache.hadoop.service.AbstractServicepublic String getQueueForReservation(org.apache.hadoop.yarn.api.records.ReservationId reservationId)
ReservationSystemQueue that an existing ReservationId is associated
with.
getQueueForReservation in interface ReservationSystemreservationId - the unique id of the reservation
public void setQueueForReservation(org.apache.hadoop.yarn.api.records.ReservationId reservationId,
String queueName)
ReservationSystemQueue that an existing ReservationId should be
associated with.
setQueueForReservation in interface ReservationSystemreservationId - the unique id of the reservationqueueName - the name of Queue to associate the reservation withpublic org.apache.hadoop.yarn.api.records.ReservationId getNewReservationId()
ReservationSystemReservationId.
getNewReservationId in interface ReservationSystemReservationIdpublic Map<String,Plan> getAllPlans()
ReservationSystem
getAllPlans in interface ReservationSystempublic static String getDefaultReservationSystem(ResourceScheduler scheduler)
scheduler - the scheduler for which the reservation system is required
protected abstract Plan initializePlan(String planQueueName)
throws org.apache.hadoop.yarn.exceptions.YarnException
org.apache.hadoop.yarn.exceptions.YarnExceptionprotected abstract Planner getReplanner(String planQueueName)
protected abstract ReservationAgent getAgent(String queueName)
protected abstract SharingPolicy getAdmissionPolicy(String queueName)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||