Interface PlanContext
- All Known Subinterfaces:
Plan,PlanEdit,org.apache.hadoop.yarn.server.resourcemanager.reservation.PlanView
- All Known Implementing Classes:
InMemoryPlan
public interface PlanContext
This interface provides read-only access to configuration-type parameter for
a plan.
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.yarn.api.records.ResourceReturns the single largestResourceallocation that can be reserved in this planlongReturns the maximum periodicity allowed in a recurrence expression for reservations of a particular plan.org.apache.hadoop.yarn.api.records.ResourceReturns the single smallestResourceallocation that can be reserved in this planbooleanInstructs thePlanFolloweron what to do for applications which are still running when the reservation is expiring (move-to-default vs kill)Return theQueueMetricsfor the queue in theResourceSchedulercorresponding to this planReturn the name of the queue in theResourceSchedulercorresponding to this planReturn an instance of aPlanner, which will be invoked in response to unexpected reduction in the resources of this planReturn theReservationAgentconfigured for this plan that is responsible for optimally placing various reservation requestsorg.apache.hadoop.yarn.util.resource.ResourceCalculatorReturns the systemResourceCalculatorReturn the configuredSharingPolicythat governs the sharing of the resources of the plan between its various userslonggetStep()Returns the configured "step" or granularity of time of the plan in millis.
-
Method Details
-
getStep
long getStep()Returns the configured "step" or granularity of time of the plan in millis.- Returns:
- plan step in millis
-
getReservationAgent
ReservationAgent getReservationAgent()Return theReservationAgentconfigured for this plan that is responsible for optimally placing various reservation requests- Returns:
- the
ReservationAgentconfigured for this plan
-
getReplanner
Planner getReplanner()Return an instance of aPlanner, which will be invoked in response to unexpected reduction in the resources of this plan- Returns:
- an instance of a
Planner, which will be invoked in response to unexpected reduction in the resources of this plan
-
getSharingPolicy
SharingPolicy getSharingPolicy()Return the configuredSharingPolicythat governs the sharing of the resources of the plan between its various users- Returns:
- the configured
SharingPolicythat governs the sharing of the resources of the plan between its various users
-
getResourceCalculator
org.apache.hadoop.yarn.util.resource.ResourceCalculator getResourceCalculator()Returns the systemResourceCalculator- Returns:
- the system
ResourceCalculator
-
getMinimumAllocation
org.apache.hadoop.yarn.api.records.Resource getMinimumAllocation()Returns the single smallestResourceallocation that can be reserved in this plan- Returns:
- the single smallest
Resourceallocation that can be reserved in this plan
-
getMaximumAllocation
org.apache.hadoop.yarn.api.records.Resource getMaximumAllocation()Returns the single largestResourceallocation that can be reserved in this plan- Returns:
- the single largest
Resourceallocation that can be reserved in this plan
-
getMaximumPeriodicity
long getMaximumPeriodicity()Returns the maximum periodicity allowed in a recurrence expression for reservations of a particular plan. This value must be divisible by the recurrence expression of a newly submitted reservation. Otherwise, the reservation submission will fail.- Returns:
- the maximum periodicity allowed in a recurrence expression for reservations of a particular plan.
-
getQueueName
String getQueueName()Return the name of the queue in theResourceSchedulercorresponding to this plan- Returns:
- the name of the queue in the
ResourceSchedulercorresponding to this plan
-
getQueueMetrics
QueueMetrics getQueueMetrics()Return theQueueMetricsfor the queue in theResourceSchedulercorresponding to this plan- Returns:
- the
QueueMetricsfor the queue in theResourceSchedulercorresponding to this plan
-
getMoveOnExpiry
boolean getMoveOnExpiry()Instructs thePlanFolloweron what to do for applications which are still running when the reservation is expiring (move-to-default vs kill)- Returns:
- true if remaining applications have to be killed, false if they have to migrated
-