ReservationAgentpublic class IterativePlanner extends PlanningAlgorithm
| Modifier and Type | Class | Description |
|---|---|---|
static class |
IterativePlanner.StageProvider |
Helper class that provide a list of ReservationRequests and iterates
forward or backward depending whether we are allocating left-to-right or
right-to-left.
|
DEFAULT_GREEDY_FAVOR_EARLY_ALLOCATION, FAVOR_EARLY_ALLOCATION| Constructor | Description |
|---|---|
IterativePlanner(StageExecutionInterval algStageExecutionInterval,
StageAllocator algStageAllocator,
boolean allocateLeft) |
| Modifier and Type | Method | Description |
|---|---|---|
RLESparseResourceAllocation |
computeJobAllocation(Plan plan,
org.apache.hadoop.yarn.api.records.ReservationId reservationId,
org.apache.hadoop.yarn.api.records.ReservationDefinition reservation,
java.lang.String user) |
|
protected java.util.Map<ReservationInterval,org.apache.hadoop.yarn.api.records.Resource> |
computeStageAllocation(Plan plan,
org.apache.hadoop.yarn.api.records.ReservationRequest rr,
long stageArrivalTime,
long stageDeadline,
long period,
java.lang.String user,
org.apache.hadoop.yarn.api.records.ReservationId oldId) |
|
protected void |
initialize(Plan plan,
org.apache.hadoop.yarn.api.records.ReservationId reservationId,
org.apache.hadoop.yarn.api.records.ReservationDefinition reservation) |
|
IterativePlanner |
setAlgStageAllocator(StageAllocator alg) |
|
IterativePlanner |
setAlgStageExecutionInterval(StageExecutionInterval alg) |
|
protected ReservationInterval |
setStageExecutionInterval(Plan plan,
org.apache.hadoop.yarn.api.records.ReservationDefinition reservation,
org.apache.hadoop.yarn.api.records.ReservationRequest currentReservationStage,
RLESparseResourceAllocation allocations) |
|
protected static boolean |
validateOrderNoGap(RLESparseResourceAllocation allocations,
java.util.Map<ReservationInterval,org.apache.hadoop.yarn.api.records.Resource> curAlloc,
boolean allocateLeft) |
allocateUser, createReservation, deleteReservation, findEarliestTime, findLatestTime, init, stepRoundDown, stepRoundUp, updateReservationpublic IterativePlanner(StageExecutionInterval algStageExecutionInterval, StageAllocator algStageAllocator, boolean allocateLeft)
public RLESparseResourceAllocation computeJobAllocation(Plan plan, org.apache.hadoop.yarn.api.records.ReservationId reservationId, org.apache.hadoop.yarn.api.records.ReservationDefinition reservation, java.lang.String user) throws PlanningException
computeJobAllocation in class PlanningAlgorithmPlanningExceptionprotected static boolean validateOrderNoGap(RLESparseResourceAllocation allocations, java.util.Map<ReservationInterval,org.apache.hadoop.yarn.api.records.Resource> curAlloc, boolean allocateLeft)
protected void initialize(Plan plan, org.apache.hadoop.yarn.api.records.ReservationId reservationId, org.apache.hadoop.yarn.api.records.ReservationDefinition reservation) throws PlanningException
PlanningExceptionprotected ReservationInterval setStageExecutionInterval(Plan plan, org.apache.hadoop.yarn.api.records.ReservationDefinition reservation, org.apache.hadoop.yarn.api.records.ReservationRequest currentReservationStage, RLESparseResourceAllocation allocations)
protected java.util.Map<ReservationInterval,org.apache.hadoop.yarn.api.records.Resource> computeStageAllocation(Plan plan, org.apache.hadoop.yarn.api.records.ReservationRequest rr, long stageArrivalTime, long stageDeadline, long period, java.lang.String user, org.apache.hadoop.yarn.api.records.ReservationId oldId) throws PlanningException
PlanningExceptionpublic IterativePlanner setAlgStageExecutionInterval(StageExecutionInterval alg)
public IterativePlanner setAlgStageAllocator(StageAllocator alg)
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.