org.apache.hadoop.yarn.server.resourcemanager.reservation
Interface PlanEdit

All Superinterfaces:
PlanContext, PlanView
All Known Subinterfaces:
Plan

public interface PlanEdit
extends PlanContext, PlanView

This interface groups the methods used to modify the state of a Plan.


Method Summary
 boolean addReservation(ReservationAllocation reservation)
          Add a new ReservationAllocation to 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 ReservationAllocation from the plan identified uniquely by its ReservationId.
 void setTotalCapacity(org.apache.hadoop.yarn.api.records.Resource capacity)
          Sets the overall capacity in terms of Resource assigned to this plan
 boolean updateReservation(ReservationAllocation reservation)
          Updates an existing ReservationAllocation in the plan.
 
Methods inherited from interface org.apache.hadoop.yarn.server.resourcemanager.reservation.PlanView
getAllReservations, getConsumptionForUser, getEarliestStartTime, getLastEndTime, getReservationById, getReservationsAtTime, getTotalCapacity, getTotalCommittedResources
 
Methods inherited from interface org.apache.hadoop.yarn.server.resourcemanager.reservation.PlanContext
getMaximumAllocation, getMinimumAllocation, getMoveOnExpiry, getQueueMetrics, getQueueName, getReplanner, getReservationAgent, getResourceCalculator, getSharingPolicy, getStep
 

Method Detail

addReservation

boolean addReservation(ReservationAllocation reservation)
                       throws PlanningException
Add a new ReservationAllocation to the plan

Parameters:
reservation - the ReservationAllocation to be added to the plan
Returns:
true if addition is successful, false otherwise
Throws:
PlanningException

updateReservation

boolean updateReservation(ReservationAllocation reservation)
                          throws PlanningException
Updates an existing ReservationAllocation in the plan. This is required for re-negotiation

Parameters:
reservation - the ReservationAllocation to be updated the plan
Returns:
true if update is successful, false otherwise
Throws:
PlanningException

deleteReservation

boolean deleteReservation(org.apache.hadoop.yarn.api.records.ReservationId reservationID)
                          throws PlanningException
Delete an existing ReservationAllocation from the plan identified uniquely by its ReservationId. This will generally be used for garbage collection

Parameters:
reservationID - the ReservationAllocation to be deleted from the plan identified uniquely by its ReservationId
Returns:
true if delete is successful, false otherwise
Throws:
PlanningException

archiveCompletedReservations

void archiveCompletedReservations(long tick)
                                  throws PlanningException
Method invoked to garbage collect old reservations. It cleans up expired reservations that have fallen out of the sliding archival window

Parameters:
tick - the current time from which the archival window is computed
Throws:
PlanningException

setTotalCapacity

void setTotalCapacity(org.apache.hadoop.yarn.api.records.Resource capacity)
Sets the overall capacity in terms of Resource assigned to this plan

Parameters:
capacity - the overall capacity in terms of Resource assigned to this plan


Copyright © 2014 Apache Software Foundation. All Rights Reserved.