All Known Implementing Classes:
AlignedPlannerWithGreedy, GreedyReservationAgent, IterativePlanner, PlanningAlgorithm, TryManyReservationAgents

public interface ReservationAgent
An entity that seeks to acquire resources to satisfy an user's contract
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final boolean
    By default favor early allocations.
    static final String
    Constant defining the preferential treatment of time for equally valid allocations.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    createReservation(org.apache.hadoop.yarn.api.records.ReservationId reservationId, String user, Plan plan, org.apache.hadoop.yarn.api.records.ReservationDefinition contract)
    Create a reservation for the user that abides by the specified contract
    boolean
    deleteReservation(org.apache.hadoop.yarn.api.records.ReservationId reservationId, String user, Plan plan)
    Delete an user reservation
    void
    init(org.apache.hadoop.conf.Configuration conf)
    Init configuration.
    boolean
    updateReservation(org.apache.hadoop.yarn.api.records.ReservationId reservationId, String user, Plan plan, org.apache.hadoop.yarn.api.records.ReservationDefinition contract)
    Update a reservation for the user that abides by the specified contract
  • Field Details

    • FAVOR_EARLY_ALLOCATION

      static final String FAVOR_EARLY_ALLOCATION
      Constant defining the preferential treatment of time for equally valid allocations.
      See Also:
    • DEFAULT_GREEDY_FAVOR_EARLY_ALLOCATION

      static final boolean DEFAULT_GREEDY_FAVOR_EARLY_ALLOCATION
      By default favor early allocations.
      See Also:
  • Method Details

    • createReservation

      boolean createReservation(org.apache.hadoop.yarn.api.records.ReservationId reservationId, String user, Plan plan, org.apache.hadoop.yarn.api.records.ReservationDefinition contract) throws PlanningException
      Create a reservation for the user that abides by the specified contract
      Parameters:
      reservationId - the identifier of the reservation to be created.
      user - the user who wants to create the reservation
      plan - the Plan to which the reservation must be fitted
      contract - encapsulates the resources the user requires for his session
      Returns:
      whether the create operation was successful or not
      Throws:
      PlanningException - if the session cannot be fitted into the plan
    • updateReservation

      boolean updateReservation(org.apache.hadoop.yarn.api.records.ReservationId reservationId, String user, Plan plan, org.apache.hadoop.yarn.api.records.ReservationDefinition contract) throws PlanningException
      Update a reservation for the user that abides by the specified contract
      Parameters:
      reservationId - the identifier of the reservation to be updated
      user - the user who wants to create the session
      plan - the Plan to which the reservation must be fitted
      contract - encapsulates the resources the user requires for his reservation
      Returns:
      whether the update operation was successful or not
      Throws:
      PlanningException - if the reservation cannot be fitted into the plan
    • deleteReservation

      boolean deleteReservation(org.apache.hadoop.yarn.api.records.ReservationId reservationId, String user, Plan plan) throws PlanningException
      Delete an user reservation
      Parameters:
      reservationId - the identifier of the reservation to be deleted
      user - the user who wants to create the reservation
      plan - the Plan to which the session must be fitted
      Returns:
      whether the delete operation was successful or not
      Throws:
      PlanningException - if the reservation cannot be fitted into the plan
    • init

      void init(org.apache.hadoop.conf.Configuration conf)
      Init configuration.
      Parameters:
      conf - Configuration