public class StageEarliestStartByDemand extends Object implements StageEarliestStart
Constructor and Description |
---|
StageEarliestStartByDemand() |
Modifier and Type | Method and Description |
---|---|
protected double |
calcWeight(org.apache.hadoop.yarn.api.records.ReservationRequest stage) |
protected long |
getRoundedDuration(org.apache.hadoop.yarn.api.records.ReservationRequest stage,
Plan plan) |
long |
setEarliestStartTime(Plan plan,
org.apache.hadoop.yarn.api.records.ReservationDefinition reservation,
int index,
org.apache.hadoop.yarn.api.records.ReservationRequest current,
long stageDeadline)
Computes the earliest allowed starting time for a given stage.
|
protected static long |
stepRoundDown(long t,
long step) |
protected static long |
stepRoundUp(long t,
long step) |
public long setEarliestStartTime(Plan plan, org.apache.hadoop.yarn.api.records.ReservationDefinition reservation, int index, org.apache.hadoop.yarn.api.records.ReservationRequest current, long stageDeadline)
StageEarliestStart
setEarliestStartTime
in interface StageEarliestStart
plan
- the Plan to which the reservation must be fittedreservation
- the job contractindex
- the index of the stage in the job contractcurrent
- the stagestageDeadline
- the deadline of the stage set by the two phase
planning algorithmprotected double calcWeight(org.apache.hadoop.yarn.api.records.ReservationRequest stage)
protected long getRoundedDuration(org.apache.hadoop.yarn.api.records.ReservationRequest stage, Plan plan)
protected static long stepRoundDown(long t, long step)
protected static long stepRoundUp(long t, long step)
Copyright © 2017 Apache Software Foundation. All Rights Reserved.