public interface PlanEdit extends PlanContext
| Modifier and Type | Method and Description | 
|---|---|
| boolean | addReservation(ReservationAllocation reservation,
              boolean isRecovering)Add a new  ReservationAllocationto the plan. | 
| void | archiveCompletedReservations(long tick)Method invoked to garbage collect old reservations. | 
| boolean | deleteReservation(org.apache.hadoop.yarn.api.records.ReservationId reservationID)Delete an existing  ReservationAllocationfrom the plan identified
 uniquely by itsReservationId. | 
| Set<ReservationAllocation> | getAllReservations()Gets all the reservations in the plan | 
| RLESparseResourceAllocation | getAvailableResourceOverTime(String user,
                            org.apache.hadoop.yarn.api.records.ReservationId oldId,
                            long start,
                            long end,
                            long period)This method returns the amount of resources available to a given user
 (optionally if removing a certain reservation) over the start-end time
 range. | 
| RLESparseResourceAllocation | getConsumptionForUserOverTime(String user,
                             long start,
                             long end)This method returns a RLE encoded view of the user reservation utilization
 between start and end time. | 
| RLESparseResourceAllocation | getCumulativeLoadOverTime(long start,
                         long end)Get the cumulative load over a time interval. | 
| long | getEarliestStartTime()Gets the time (UTC in ms) at which the first reservation starts | 
| long | getLastEndTime()Returns the time (UTC in ms) at which the last reservation terminates | 
| ReservationAllocation | getReservationById(org.apache.hadoop.yarn.api.records.ReservationId reservationID)Return a  ReservationAllocationidentified by itsReservationId | 
| Set<ReservationAllocation> | getReservationByUserAtTime(String user,
                          long t)Return a set of  ReservationAllocationthat belongs to a certain
 user and overlaps time t. | 
| RLESparseResourceAllocation | getReservationCountForUserOverTime(String user,
                                  long start,
                                  long end)This method returns a RLE encoded view of the user reservation count
 utilization between start and end time. | 
| Set<ReservationAllocation> | getReservations(org.apache.hadoop.yarn.api.records.ReservationId reservationID,
               ReservationInterval interval)Return a set of  ReservationAllocationidentified by any user. | 
| Set<ReservationAllocation> | getReservations(org.apache.hadoop.yarn.api.records.ReservationId reservationID,
               ReservationInterval interval,
               String user)Return a set of  ReservationAllocationidentified by the user who
 made the reservation. | 
| Set<ReservationAllocation> | getReservationsAtTime(long tick)Gets all the active reservations at the specified point of time | 
| org.apache.hadoop.yarn.api.records.Resource | getTotalCapacity()Returns the overall capacity in terms of  Resourceassigned to this
 plan (typically will correspond to the absolute capacity of the
 corresponding queue). | 
| org.apache.hadoop.yarn.api.records.Resource | getTotalCommittedResources(long tick)Returns the total  Resourcereserved for all users at the specified
 time | 
| void | setTotalCapacity(org.apache.hadoop.yarn.api.records.Resource capacity)Sets the overall capacity in terms of  Resourceassigned to this
 plan. | 
| boolean | updateReservation(ReservationAllocation reservation)Updates an existing  ReservationAllocationin the plan. | 
getMaximumAllocation, getMaximumPeriodicity, getMinimumAllocation, getMoveOnExpiry, getQueueMetrics, getQueueName, getReplanner, getReservationAgent, getResourceCalculator, getSharingPolicy, getStepboolean addReservation(ReservationAllocation reservation, boolean isRecovering) throws PlanningException
ReservationAllocation to the plan.reservation - the ReservationAllocation to be added to the
          planisRecovering - flag to indicate if reservation is being added as part
          of failover or notPlanningException - if addition is unsuccessfulboolean updateReservation(ReservationAllocation reservation) throws PlanningException
ReservationAllocation in the plan. This is
 required for re-negotiation.reservation - the ReservationAllocation to be updated the planPlanningException - if update is unsuccessfulboolean deleteReservation(org.apache.hadoop.yarn.api.records.ReservationId reservationID)
                   throws PlanningException
ReservationAllocation from the plan identified
 uniquely by its ReservationId. This will generally be used for
 garbage collection.reservationID - the ReservationAllocation to be deleted from
          the plan identified uniquely by its ReservationIdPlanningException - if deletion is unsuccessfulvoid archiveCompletedReservations(long tick)
                           throws PlanningException
tick - the current time from which the archival window is computedPlanningException - if archival is unsuccessfulvoid setTotalCapacity(org.apache.hadoop.yarn.api.records.Resource capacity)
Resource assigned to this
 plan.capacity - the overall capacity in terms of Resource assigned
          to this planSet<ReservationAllocation> getReservations(org.apache.hadoop.yarn.api.records.ReservationId reservationID, ReservationInterval interval, String user)
ReservationAllocation identified by the user who
 made the reservation.reservationID - the unqiue id to identify the
          ReservationAllocationinterval - the time interval used to retrieve the reservation
          allocations from. Only reservations with start time no greater
          than the interval end time, and end time no less than the interval
          start time will be selected.user - the user to retrieve the reservation allocation from.ReservationAllocation identified by the user who
         made the reservationSet<ReservationAllocation> getReservations(org.apache.hadoop.yarn.api.records.ReservationId reservationID, ReservationInterval interval)
ReservationAllocation identified by any user.reservationID - the unqiue id to identify the
          ReservationAllocationinterval - the time interval used to retrieve the reservation
          allocations from. Only reservations with start time no greater
          than the interval end time, and end time no less than the interval
          start time will be selected.ReservationAllocation identified by any userReservationAllocation getReservationById(org.apache.hadoop.yarn.api.records.ReservationId reservationID)
ReservationAllocation identified by its
 ReservationIdreservationID - the unique id to identify the
          ReservationAllocationReservationAllocation identified by the specified idSet<ReservationAllocation> getReservationByUserAtTime(String user, long t)
ReservationAllocation that belongs to a certain
 user and overlaps time t.user - the user being consideredt - the instant in time being consideredReservationAllocations for this user at this
         timeSet<ReservationAllocation> getReservationsAtTime(long tick)
tick - the time (UTC in ms) for which the active reservations are
          requestedSet<ReservationAllocation> getAllReservations()
org.apache.hadoop.yarn.api.records.Resource getTotalCommittedResources(long tick)
Resource reserved for all users at the specified
 timetick - the time (UTC in ms) for which the reserved resources are
          requestedResource reserved for all users at the specified
         timeorg.apache.hadoop.yarn.api.records.Resource getTotalCapacity()
Resource assigned to this
 plan (typically will correspond to the absolute capacity of the
 corresponding queue).Resource assigned to this
         planlong getEarliestStartTime()
long getLastEndTime()
RLESparseResourceAllocation getAvailableResourceOverTime(String user, org.apache.hadoop.yarn.api.records.ReservationId oldId, long start, long end, long period) throws PlanningException
user - the user being consideredoldId - the identifier of the existing reservationstart - start of the time interval.end - end of the time interval.period - the ms periodicty for this request (loop and pick min till
          maxPeriodicity)PlanningException - if operation is unsuccessfulRLESparseResourceAllocation getReservationCountForUserOverTime(String user, long start, long end)
user - the user being consideredstart - start of the time interval.end - end of the time interval.RLESparseResourceAllocation getConsumptionForUserOverTime(String user, long start, long end)
user - the user being consideredstart - start of the time interval.end - end of the time interval.RLESparseResourceAllocation getCumulativeLoadOverTime(long start, long end) throws PlanningException
start - start of the time interval.end - end of the time interval.PlanningException - if operation is unsuccessfulCopyright © 2008–2023 Apache Software Foundation. All rights reserved.