|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.yarn.server.resourcemanager.reservation.RLESparseResourceAllocation
public class RLESparseResourceAllocation
This is a run length encoded sparse data structure that maintains resource allocations over time
| Constructor Summary | |
|---|---|
RLESparseResourceAllocation(org.apache.hadoop.yarn.util.resource.ResourceCalculator resourceCalculator,
org.apache.hadoop.yarn.api.records.Resource minAlloc)
|
|
| Method Summary | |
|---|---|
boolean |
addCompositeInterval(ReservationInterval reservationInterval,
List<org.apache.hadoop.yarn.api.records.ReservationRequest> ReservationRequests,
org.apache.hadoop.yarn.api.records.Resource clusterResource)
Add multiple resources for the specified interval |
boolean |
addInterval(ReservationInterval reservationInterval,
org.apache.hadoop.yarn.api.records.ReservationRequest capacity)
Add a resource for the specified interval |
org.apache.hadoop.yarn.api.records.Resource |
getCapacityAtTime(long tick)
Returns the capacity, i.e. |
long |
getEarliestStartTime()
Get the timestamp of the earliest resource allocation |
long |
getLatestEndTime()
Get the timestamp of the latest resource allocation |
boolean |
isEmpty()
Returns true if there are no non-zero entries |
boolean |
removeInterval(ReservationInterval reservationInterval,
org.apache.hadoop.yarn.api.records.ReservationRequest capacity)
Removes a resource for the specified interval |
String |
toMemJSONString()
Returns the JSON string representation of the current resources allocated over time |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public RLESparseResourceAllocation(org.apache.hadoop.yarn.util.resource.ResourceCalculator resourceCalculator,
org.apache.hadoop.yarn.api.records.Resource minAlloc)
| Method Detail |
|---|
public boolean addInterval(ReservationInterval reservationInterval,
org.apache.hadoop.yarn.api.records.ReservationRequest capacity)
reservationInterval - the interval for which the resource is to be
addedcapacity - the resource to be added
public boolean addCompositeInterval(ReservationInterval reservationInterval,
List<org.apache.hadoop.yarn.api.records.ReservationRequest> ReservationRequests,
org.apache.hadoop.yarn.api.records.Resource clusterResource)
reservationInterval - the interval for which the resource is to be
addedReservationRequests - the resources to be addedclusterResource - the total resources in the cluster
public boolean removeInterval(ReservationInterval reservationInterval,
org.apache.hadoop.yarn.api.records.ReservationRequest capacity)
reservationInterval - the interval for which the resource is to be
removedcapacity - the resource to be removed
public org.apache.hadoop.yarn.api.records.Resource getCapacityAtTime(long tick)
tick - the time (UTC in ms) at which the capacity is requested
public long getEarliestStartTime()
public long getLatestEndTime()
public boolean isEmpty()
public String toString()
toString in class Objectpublic String toMemJSONString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||