public class IterativePlanner extends PlanningAlgorithm
Modifier and Type | Class and 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 and Description |
---|
IterativePlanner(StageExecutionInterval algStageExecutionInterval,
StageAllocator algStageAllocator,
boolean allocateLeft) |
Modifier and Type | Method and Description |
---|---|
RLESparseResourceAllocation |
computeJobAllocation(Plan plan,
org.apache.hadoop.yarn.api.records.ReservationId reservationId,
org.apache.hadoop.yarn.api.records.ReservationDefinition reservation,
String user) |
protected 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,
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,
Map<ReservationInterval,org.apache.hadoop.yarn.api.records.Resource> curAlloc,
boolean allocateLeft) |
allocateUser, createReservation, deleteReservation, findEarliestTime, findLatestTime, init, stepRoundDown, stepRoundUp, updateReservation
public 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, String user) throws PlanningException
computeJobAllocation
in class PlanningAlgorithm
PlanningException
protected static boolean validateOrderNoGap(RLESparseResourceAllocation allocations, 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
PlanningException
protected ReservationInterval setStageExecutionInterval(Plan plan, org.apache.hadoop.yarn.api.records.ReservationDefinition reservation, org.apache.hadoop.yarn.api.records.ReservationRequest currentReservationStage, RLESparseResourceAllocation allocations)
protected 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, String user, org.apache.hadoop.yarn.api.records.ReservationId oldId) throws PlanningException
PlanningException
public IterativePlanner setAlgStageExecutionInterval(StageExecutionInterval alg)
public IterativePlanner setAlgStageAllocator(StageAllocator alg)
Copyright © 2008–2021 Apache Software Foundation. All rights reserved.