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

All Superinterfaces:
Comparable<ReservationAllocation>

public interface ReservationAllocation
extends Comparable<ReservationAllocation>

A ReservationAllocation represents a concrete allocation of resources over time that satisfy a certain ReservationDefinition. This is used internally by a Plan to store information about how each of the accepted ReservationDefinition have been allocated.


Method Summary
 boolean containsGangs()
          Returns whether the reservation has gang semantics or not
 long getAcceptanceTime()
          Returns the time at which the reservation was accepted by the system
 Map<ReservationInterval,org.apache.hadoop.yarn.api.records.ReservationRequest> 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
 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
 long getStartTime()
          Returns the time at which the reservation is activated
 String getUser()
          Returns the user who requested the reservation
 void setAcceptanceTimestamp(long acceptedAt)
          Sets the time at which the reservation was accepted by the system
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getReservationId

org.apache.hadoop.yarn.api.records.ReservationId getReservationId()
Returns the unique identifier ReservationId that represents the reservation

Returns:
reservationId the unique identifier ReservationId that represents the reservation

getReservationDefinition

org.apache.hadoop.yarn.api.records.ReservationDefinition getReservationDefinition()
Returns the original ReservationDefinition submitted by the client

Returns:
the ReservationDefinition submitted by the client

getStartTime

long getStartTime()
Returns the time at which the reservation is activated

Returns:
the time at which the reservation is activated

getEndTime

long getEndTime()
Returns the time at which the reservation terminates

Returns:
the time at which the reservation terminates

getAllocationRequests

Map<ReservationInterval,org.apache.hadoop.yarn.api.records.ReservationRequest> getAllocationRequests()
Returns the map of resources requested against the time interval for which they were

Returns:
the allocationRequests the map of resources requested against the time interval for which they were

getPlanName

String getPlanName()
Return a string identifying the plan to which the reservation belongs

Returns:
the plan to which the reservation belongs

getUser

String getUser()
Returns the user who requested the reservation

Returns:
the user who requested the reservation

containsGangs

boolean containsGangs()
Returns whether the reservation has gang semantics or not

Returns:
true if there is a gang request, false otherwise

setAcceptanceTimestamp

void setAcceptanceTimestamp(long acceptedAt)
Sets the time at which the reservation was accepted by the system

Parameters:
acceptedAt - the time at which the reservation was accepted by the system

getAcceptanceTime

long getAcceptanceTime()
Returns the time at which the reservation was accepted by the system

Returns:
the time at which the reservation was accepted by the system

getResourcesAtTime

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

Parameters:
tick - the time (UTC in ms) for which the reserved resources are requested
Returns:
the resources reserved at the specified time


Copyright © 2014 Apache Software Foundation. All Rights Reserved.