All Known Implementing Classes:
StageAllocatorGreedy, StageAllocatorGreedyRLE, StageAllocatorLowCostAligned

public interface StageAllocator
Interface for allocating a single stage in IterativePlanner.
  • Method Summary

    Modifier and Type
    Method
    Description
    Map<ReservationInterval,org.apache.hadoop.yarn.api.records.Resource>
    computeStageAllocation(Plan plan, RLESparseResourceAllocation planLoads, RLESparseResourceAllocation planModifications, org.apache.hadoop.yarn.api.records.ReservationRequest rr, long stageArrival, long stageDeadline, long period, String user, org.apache.hadoop.yarn.api.records.ReservationId oldId)
    Computes the allocation of a stage inside a defined time interval.
  • Method Details

    • computeStageAllocation

      Map<ReservationInterval,org.apache.hadoop.yarn.api.records.Resource> computeStageAllocation(Plan plan, RLESparseResourceAllocation planLoads, RLESparseResourceAllocation planModifications, org.apache.hadoop.yarn.api.records.ReservationRequest rr, long stageArrival, long stageDeadline, long period, String user, org.apache.hadoop.yarn.api.records.ReservationId oldId) throws PlanningException
      Computes the allocation of a stage inside a defined time interval.
      Parameters:
      plan - the Plan to which the reservation must be fitted
      planLoads - a 'dirty' read of the plan loads at each time
      planModifications - the allocations performed by the planning algorithm which are not yet reflected by plan
      rr - the stage
      stageArrival - the arrival time (earliest starting time) set for the stage by the two phase planning algorithm
      stageDeadline - the deadline of the stage set by the two phase planning algorithm
      period - the periodicity with which this stage appears
      user - name of the user
      oldId - identifier of the old reservation
      Returns:
      The computed allocation (or null if the stage could not be allocated)
      Throws:
      PlanningException - if operation is unsuccessful