org.apache.hadoop.yarn.server.resourcemanager.reservation
Class NoOverCommitPolicy

java.lang.Object
  extended by org.apache.hadoop.yarn.server.resourcemanager.reservation.NoOverCommitPolicy
All Implemented Interfaces:
SharingPolicy

@InterfaceAudience.LimitedPrivate(value="yarn")
@InterfaceStability.Unstable
public class NoOverCommitPolicy
extends Object
implements SharingPolicy

This policy enforce a simple physical cluster capacity constraints, by validating that the allocation proposed fits in the current plan. This validation is compatible with "updates" and in verifying the capacity constraints it conceptually remove the prior version of the reservation.


Constructor Summary
NoOverCommitPolicy()
           
 
Method Summary
 long getValidWindow()
          Returns the time range before and after the current reservation considered by this policy.
 void init(String planQueuePath, org.apache.hadoop.conf.Configuration 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoOverCommitPolicy

public NoOverCommitPolicy()
Method Detail

validate

public void validate(Plan plan,
                     ReservationAllocation reservation)
              throws PlanningException
Description copied from interface: SharingPolicy
This method runs the policy validation logic, and return true/false on whether the ReservationAllocation is acceptable according to this sharing policy.

Specified by:
validate in interface SharingPolicy
Parameters:
plan - the Plan we validate against
reservation - the allocation proposed to be added to the Plan
Throws:
PlanningException - if the policy is respected if we add this ReservationAllocation to the Plan

getValidWindow

public long getValidWindow()
Description copied from interface: SharingPolicy
Returns the time range before and after the current reservation considered by this policy. In particular, this informs the archival process for the Plan, i.e., reservations regarding times before (now - validWindow) can be deleted.

Specified by:
getValidWindow in interface SharingPolicy
Returns:
validWindow the window of validity considered by the policy.

init

public void init(String planQueuePath,
                 org.apache.hadoop.conf.Configuration conf)
Description copied from interface: SharingPolicy
Initialize this policy

Specified by:
init in interface SharingPolicy
Parameters:
planQueuePath - the name of the queue for this plan
conf - the system configuration


Copyright © 2014 Apache Software Foundation. All Rights Reserved.