public class InMemoryReservationAllocation extends Object implements ReservationAllocation
RLESparseResourceAllocation| Constructor and Description |
|---|
InMemoryReservationAllocation(org.apache.hadoop.yarn.api.records.ReservationId reservationID,
org.apache.hadoop.yarn.api.records.ReservationDefinition contract,
String user,
String planName,
long startTime,
long endTime,
Map<ReservationInterval,org.apache.hadoop.yarn.api.records.Resource> allocations,
org.apache.hadoop.yarn.util.resource.ResourceCalculator calculator,
org.apache.hadoop.yarn.api.records.Resource minAlloc) |
InMemoryReservationAllocation(org.apache.hadoop.yarn.api.records.ReservationId reservationID,
org.apache.hadoop.yarn.api.records.ReservationDefinition contract,
String user,
String planName,
long startTime,
long endTime,
Map<ReservationInterval,org.apache.hadoop.yarn.api.records.Resource> allocations,
org.apache.hadoop.yarn.util.resource.ResourceCalculator calculator,
org.apache.hadoop.yarn.api.records.Resource minAlloc,
boolean hasGang) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(ReservationAllocation other) |
boolean |
containsGangs()
Returns whether the reservation has gang semantics or not
|
boolean |
equals(Object obj) |
long |
getAcceptanceTime()
Returns the time at which the reservation was accepted by the system
|
Map<ReservationInterval,org.apache.hadoop.yarn.api.records.Resource> |
getAllocationRequests()
Returns the map of resources requested against the time interval for which
they were.
|
long |
getEndTime()
Returns the time at which the reservation terminates.
|
long |
getPeriodicity()
Get the periodicity of this reservation representing the time period of the
periodic job.
|
String |
getPlanName()
Return a string identifying the plan to which the reservation belongs
|
org.apache.hadoop.yarn.api.records.ReservationDefinition |
getReservationDefinition()
Returns the original
ReservationDefinition submitted by the client |
org.apache.hadoop.yarn.api.records.ReservationId |
getReservationId()
Returns the unique identifier
ReservationId that represents the
reservation |
org.apache.hadoop.yarn.api.records.Resource |
getResourcesAtTime(long tick)
Returns the capacity represented by cumulative resources reserved by the
reservation at the specified point of time
|
RLESparseResourceAllocation |
getResourcesOverTime()
Return a RLE representation of used resources.
|
RLESparseResourceAllocation |
getResourcesOverTime(long start,
long end)
Return a RLE representation of used resources.
|
long |
getStartTime()
Returns the time at which the reservation is activated.
|
String |
getUser()
Returns the user who requested the reservation
|
int |
hashCode() |
void |
setAcceptanceTimestamp(long acceptedAt)
Sets the time at which the reservation was accepted by the system
|
void |
setPeriodicity(long period)
Set the periodicity of this reservation representing the time period of the
periodic job.
|
String |
toString() |
public InMemoryReservationAllocation(org.apache.hadoop.yarn.api.records.ReservationId reservationID,
org.apache.hadoop.yarn.api.records.ReservationDefinition contract,
String user,
String planName,
long startTime,
long endTime,
Map<ReservationInterval,org.apache.hadoop.yarn.api.records.Resource> allocations,
org.apache.hadoop.yarn.util.resource.ResourceCalculator calculator,
org.apache.hadoop.yarn.api.records.Resource minAlloc)
public InMemoryReservationAllocation(org.apache.hadoop.yarn.api.records.ReservationId reservationID,
org.apache.hadoop.yarn.api.records.ReservationDefinition contract,
String user,
String planName,
long startTime,
long endTime,
Map<ReservationInterval,org.apache.hadoop.yarn.api.records.Resource> allocations,
org.apache.hadoop.yarn.util.resource.ResourceCalculator calculator,
org.apache.hadoop.yarn.api.records.Resource minAlloc,
boolean hasGang)
public org.apache.hadoop.yarn.api.records.ReservationId getReservationId()
ReservationAllocationReservationId that represents the
reservationgetReservationId in interface ReservationAllocationReservationId that
represents the reservationpublic org.apache.hadoop.yarn.api.records.ReservationDefinition getReservationDefinition()
ReservationAllocationReservationDefinition submitted by the clientgetReservationDefinition in interface ReservationAllocationReservationDefinition submitted by the clientpublic long getStartTime()
ReservationAllocationgetStartTime in interface ReservationAllocationpublic long getEndTime()
ReservationAllocationgetEndTime in interface ReservationAllocationpublic Map<ReservationInterval,org.apache.hadoop.yarn.api.records.Resource> getAllocationRequests()
ReservationAllocationgetAllocationRequests in interface ReservationAllocationpublic String getPlanName()
ReservationAllocationgetPlanName in interface ReservationAllocationpublic String getUser()
ReservationAllocationgetUser in interface ReservationAllocationpublic boolean containsGangs()
ReservationAllocationcontainsGangs in interface ReservationAllocationpublic void setAcceptanceTimestamp(long acceptedAt)
ReservationAllocationsetAcceptanceTimestamp in interface ReservationAllocationacceptedAt - the time at which the reservation was accepted by the
systempublic long getAcceptanceTime()
ReservationAllocationgetAcceptanceTime in interface ReservationAllocationpublic org.apache.hadoop.yarn.api.records.Resource getResourcesAtTime(long tick)
ReservationAllocationgetResourcesAtTime in interface ReservationAllocationtick - the time (UTC in ms) for which the reserved resources are
requestedpublic RLESparseResourceAllocation getResourcesOverTime()
ReservationAllocationgetResourcesOverTime in interface ReservationAllocationpublic RLESparseResourceAllocation getResourcesOverTime(long start, long end)
ReservationAllocationgetResourcesOverTime in interface ReservationAllocationstart - start of the time interval.end - end of the time interval.public long getPeriodicity()
ReservationAllocationgetPeriodicity in interface ReservationAllocationpublic void setPeriodicity(long period)
ReservationAllocationsetPeriodicity in interface ReservationAllocationperiod - periodicity of this reservationpublic int compareTo(ReservationAllocation other)
compareTo in interface Comparable<ReservationAllocation>Copyright © 2008–2022 Apache Software Foundation. All rights reserved.