@InterfaceAudience.LimitedPrivate(value="yarn") @InterfaceStability.Unstable public interface ReservationSystem extends Recoverable
Resource allocations in future. Implementors
 need to bootstrap all configured Plans in the active
 ResourceScheduler along with their corresponding
 ReservationAgent and SharingPolicy. It is also responsible
 for managing the PlanFollower to ensure the Plans are in sync
 with the ResourceScheduler.| Modifier and Type | Method and Description | 
|---|---|
| Map<String,Plan> | getAllPlans()Return a map containing all the plans known to this ReservationSystem
 (useful for UI) | 
| org.apache.hadoop.yarn.api.records.ReservationId | getNewReservationId()Get a new unique  ReservationId. | 
| Plan | getPlan(String planName)Get an existing  Planthat has been initialized. | 
| long | getPlanFollowerTimeStep()Return the time step (ms) at which the  PlanFolloweris invoked | 
| String | getQueueForReservation(org.apache.hadoop.yarn.api.records.ReservationId reservationId)Get the  Queuethat an existingReservationIdis associated
 with. | 
| ReservationsACLsManager | getReservationsACLsManager()Get the  ReservationsACLsManagerto use to check for the reservation
 access on a user. | 
| void | reinitialize(org.apache.hadoop.conf.Configuration conf,
            RMContext rmContext)Re-initialize the  ReservationSystem. | 
| void | setQueueForReservation(org.apache.hadoop.yarn.api.records.ReservationId reservationId,
                      String queueName)Set the  Queuethat an existingReservationIdshould be
 associated with. | 
| void | setRMContext(RMContext rmContext)Set RMContext for  ReservationSystem. | 
| void | synchronizePlan(String planName,
               boolean shouldReplan) | 
recovervoid setRMContext(RMContext rmContext)
ReservationSystem. This method should be called
 immediately after instantiating a reservation system once.rmContext - created by ResourceManagervoid reinitialize(org.apache.hadoop.conf.Configuration conf,
                  RMContext rmContext)
           throws org.apache.hadoop.yarn.exceptions.YarnException
ReservationSystem.conf - configurationrmContext - current context of the ResourceManagerorg.apache.hadoop.yarn.exceptions.YarnException - if initialization of the configured plan failsMap<String,Plan> getAllPlans()
void synchronizePlan(String planName, boolean shouldReplan)
planName - the name of the Plan to be synchronizedshouldReplan - replan on reduction of plan capacity if true or
          proportionally scale down reservations if falselong getPlanFollowerTimeStep()
PlanFollower is invokedPlanFollower is invokedorg.apache.hadoop.yarn.api.records.ReservationId getNewReservationId()
ReservationId.ReservationIdString getQueueForReservation(org.apache.hadoop.yarn.api.records.ReservationId reservationId)
Queue that an existing ReservationId is associated
 with.reservationId - the unique id of the reservationvoid setQueueForReservation(org.apache.hadoop.yarn.api.records.ReservationId reservationId,
                            String queueName)
Queue that an existing ReservationId should be
 associated with.reservationId - the unique id of the reservationqueueName - the name of Queue to associate the reservation withReservationsACLsManager getReservationsACLsManager()
ReservationsACLsManager to use to check for the reservation
 access on a user.Copyright © 2008–2023 Apache Software Foundation. All rights reserved.