java.lang.Comparable<ReservationAllocation>, ReservationAllocationpublic class InMemoryReservationAllocation extends java.lang.Object implements ReservationAllocation
RLESparseResourceAllocation| Constructor | Description |
|---|---|
InMemoryReservationAllocation(org.apache.hadoop.yarn.api.records.ReservationId reservationID,
org.apache.hadoop.yarn.api.records.ReservationDefinition contract,
java.lang.String user,
java.lang.String planName,
long startTime,
long endTime,
java.util.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,
java.lang.String user,
java.lang.String planName,
long startTime,
long endTime,
java.util.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 | Description |
|---|---|---|
int |
compareTo(ReservationAllocation other) |
|
boolean |
containsGangs() |
Returns whether the reservation has gang semantics or not
|
boolean |
equals(java.lang.Object obj) |
|
long |
getAcceptanceTime() |
Returns the time at which the reservation was accepted by the system
|
java.util.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.
|
java.lang.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.
|
java.lang.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.
|
java.lang.String |
toString() |
public InMemoryReservationAllocation(org.apache.hadoop.yarn.api.records.ReservationId reservationID,
org.apache.hadoop.yarn.api.records.ReservationDefinition contract,
java.lang.String user,
java.lang.String planName,
long startTime,
long endTime,
java.util.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,
java.lang.String user,
java.lang.String planName,
long startTime,
long endTime,
java.util.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 java.util.Map<ReservationInterval,org.apache.hadoop.yarn.api.records.Resource> getAllocationRequests()
ReservationAllocationgetAllocationRequests in interface ReservationAllocationpublic java.lang.String getPlanName()
ReservationAllocationgetPlanName in interface ReservationAllocationpublic java.lang.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 java.lang.String toString()
toString in class java.lang.Objectpublic int compareTo(ReservationAllocation other)
compareTo in interface java.lang.Comparable<ReservationAllocation>public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.ObjectCopyright © 2008–2025 Apache Software Foundation. All rights reserved.