@InterfaceAudience.LimitedPrivate(value="yarn")
@InterfaceStability.Unstable
public interface SharingPolicy
ReservationAllocations for allocations being added to a Plan.
Individual policies will be enforcing different invariants.| Modifier and Type | Method and Description |
|---|---|
long |
getValidWindow()
Returns the time range before and after the current reservation considered
by this policy.
|
void |
init(String planQueuePath,
ReservationSchedulerConfiguration conf)
Initialize this policy
|
void |
validate(Plan plan,
ReservationAllocation newAllocation)
This method runs the policy validation logic, and return true/false on
whether the
ReservationAllocation is acceptable according to this
sharing policy. |
void init(String planQueuePath, ReservationSchedulerConfiguration conf)
planQueuePath - the name of the queue for this planconf - the system configurationvoid validate(Plan plan, ReservationAllocation newAllocation) throws PlanningException
ReservationAllocation is acceptable according to this
sharing policy.plan - the Plan we validate againstnewAllocation - the allocation proposed to be added to the
PlanPlanningException - if the policy is respected if we add this
ReservationAllocation to the Planlong getValidWindow()
Plan, i.e., reservations regarding times before (now - validWindow)
can be deleted.Copyright © 2016 Apache Software Foundation. All Rights Reserved.