@InterfaceAudience.LimitedPrivate(value="yarn") @InterfaceStability.Unstable public class CapacityOverTimePolicy extends Object implements SharingPolicy
Constructor and Description |
---|
CapacityOverTimePolicy() |
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 reservationQueuePath,
ReservationSchedulerConfiguration conf)
Initialize this policy
|
void |
validate(Plan plan,
ReservationAllocation reservation)
This method runs the policy validation logic, and return true/false on
whether the
ReservationAllocation is acceptable according to this
sharing policy. |
public void init(String reservationQueuePath, ReservationSchedulerConfiguration conf)
SharingPolicy
init
in interface SharingPolicy
reservationQueuePath
- the name of the queue for this planconf
- the system configurationpublic void validate(Plan plan, ReservationAllocation reservation) throws PlanningException
SharingPolicy
ReservationAllocation
is acceptable according to this
sharing policy.validate
in interface SharingPolicy
plan
- the Plan
we validate againstreservation
- the allocation proposed to be added to the
Plan
PlanningException
- if the policy is respected if we add this
ReservationAllocation
to the Plan
public long getValidWindow()
SharingPolicy
Plan
, i.e., reservations regarding times before (now - validWindow)
can be deleted.getValidWindow
in interface SharingPolicy
Copyright © 2019 Apache Software Foundation. All Rights Reserved.