public interface PlanView extends PlanContext
ReservationAgents to
determine the free resources in a certain point in time, and by
PlanFollowerPolicy to publish this plan to the scheduler.| Modifier and Type | Method and Description |
|---|---|
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)
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.
|
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
ReservationAllocation identified by its
ReservationId |
Set<ReservationAllocation> |
getReservationByUserAtTime(String user,
long t)
Return a set of
ReservationAllocation that 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
ReservationAllocation identified by any user. |
Set<ReservationAllocation> |
getReservations(org.apache.hadoop.yarn.api.records.ReservationId reservationID,
ReservationInterval interval,
String user)
Return a set of
ReservationAllocation identified 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
Resource assigned 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
Resource reserved for all users at the specified
time |
getMaximumAllocation, getMinimumAllocation, getMoveOnExpiry, getQueueMetrics, getQueueName, getReplanner, getReservationAgent, getResourceCalculator, getSharingPolicy, getStepSet<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) throws PlanningException
user - oldId - start - end - PlanningExceptionRLESparseResourceAllocation getReservationCountForUserOverTime(String user, long start, long end)
user - start - end - RLESparseResourceAllocation getConsumptionForUserOverTime(String user, long start, long end)
user - start - end - Copyright © 2017 Apache Software Foundation. All Rights Reserved.