org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair
Class AllocationConfiguration

java.lang.Object
  extended by org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.AllocationConfiguration

public class AllocationConfiguration
extends Object


Constructor Summary
AllocationConfiguration(org.apache.hadoop.conf.Configuration conf)
           
AllocationConfiguration(Map<String,org.apache.hadoop.yarn.api.records.Resource> minQueueResources, Map<String,org.apache.hadoop.yarn.api.records.Resource> maxQueueResources, Map<String,Integer> queueMaxApps, Map<String,Integer> userMaxApps, Map<String,ResourceWeights> queueWeights, int userMaxAppsDefault, int queueMaxAppsDefault, Map<String,SchedulingPolicy> schedulingPolicies, SchedulingPolicy defaultSchedulingPolicy, Map<String,Long> minSharePreemptionTimeouts, Map<String,Map<org.apache.hadoop.yarn.api.records.QueueACL,org.apache.hadoop.security.authorize.AccessControlList>> queueAcls, long fairSharePreemptionTimeout, long defaultMinSharePreemptionTimeout, QueuePlacementPolicy placementPolicy, Set<String> queueNames)
           
 
Method Summary
 SchedulingPolicy getDefaultSchedulingPolicy()
           
 long getFairSharePreemptionTimeout()
          Get the fair share preemption, in milliseconds.
 org.apache.hadoop.yarn.api.records.Resource getMaxResources(String queueName)
          Get the maximum resource allocation for the given queue.
 org.apache.hadoop.yarn.api.records.Resource getMinResources(String queue)
          Get the minimum resource allocation for the given queue.
 long getMinSharePreemptionTimeout(String queueName)
          Get a queue's min share preemption timeout, in milliseconds.
 QueuePlacementPolicy getPlacementPolicy()
           
 org.apache.hadoop.security.authorize.AccessControlList getQueueAcl(String queue, org.apache.hadoop.yarn.api.records.QueueACL operation)
          Get the ACLs associated with this queue.
 int getQueueMaxApps(String queue)
           
 Set<String> getQueueNames()
           
 ResourceWeights getQueueWeight(String queue)
           
 SchedulingPolicy getSchedulingPolicy(String queueName)
           
 int getUserMaxApps(String user)
           
 boolean hasAccess(String queueName, org.apache.hadoop.yarn.api.records.QueueACL acl, org.apache.hadoop.security.UserGroupInformation user)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AllocationConfiguration

public AllocationConfiguration(Map<String,org.apache.hadoop.yarn.api.records.Resource> minQueueResources,
                               Map<String,org.apache.hadoop.yarn.api.records.Resource> maxQueueResources,
                               Map<String,Integer> queueMaxApps,
                               Map<String,Integer> userMaxApps,
                               Map<String,ResourceWeights> queueWeights,
                               int userMaxAppsDefault,
                               int queueMaxAppsDefault,
                               Map<String,SchedulingPolicy> schedulingPolicies,
                               SchedulingPolicy defaultSchedulingPolicy,
                               Map<String,Long> minSharePreemptionTimeouts,
                               Map<String,Map<org.apache.hadoop.yarn.api.records.QueueACL,org.apache.hadoop.security.authorize.AccessControlList>> queueAcls,
                               long fairSharePreemptionTimeout,
                               long defaultMinSharePreemptionTimeout,
                               QueuePlacementPolicy placementPolicy,
                               Set<String> queueNames)

AllocationConfiguration

public AllocationConfiguration(org.apache.hadoop.conf.Configuration conf)
Method Detail

getQueueAcl

public org.apache.hadoop.security.authorize.AccessControlList getQueueAcl(String queue,
                                                                          org.apache.hadoop.yarn.api.records.QueueACL operation)
Get the ACLs associated with this queue. If a given ACL is not explicitly configured, include the default value for that ACL. The default for the root queue is everybody ("*") and the default for all other queues is nobody ("")


getMinSharePreemptionTimeout

public long getMinSharePreemptionTimeout(String queueName)
Get a queue's min share preemption timeout, in milliseconds. This is the time after which jobs in the queue may kill other queues' tasks if they are below their min share.


getFairSharePreemptionTimeout

public long getFairSharePreemptionTimeout()
Get the fair share preemption, in milliseconds. This is the time after which any job may kill other jobs' tasks if it is below half its fair share.


getQueueWeight

public ResourceWeights getQueueWeight(String queue)

getUserMaxApps

public int getUserMaxApps(String user)

getQueueMaxApps

public int getQueueMaxApps(String queue)

getMinResources

public org.apache.hadoop.yarn.api.records.Resource getMinResources(String queue)
Get the minimum resource allocation for the given queue.

Returns:
the cap set on this queue, or 0 if not set.

getMaxResources

public org.apache.hadoop.yarn.api.records.Resource getMaxResources(String queueName)
Get the maximum resource allocation for the given queue.

Returns:
the cap set on this queue, or Integer.MAX_VALUE if not set.

hasAccess

public boolean hasAccess(String queueName,
                         org.apache.hadoop.yarn.api.records.QueueACL acl,
                         org.apache.hadoop.security.UserGroupInformation user)

getSchedulingPolicy

public SchedulingPolicy getSchedulingPolicy(String queueName)

getDefaultSchedulingPolicy

public SchedulingPolicy getDefaultSchedulingPolicy()

getQueueNames

public Set<String> getQueueNames()

getPlacementPolicy

public QueuePlacementPolicy getPlacementPolicy()


Copyright © 2014 Apache Software Foundation. All Rights Reserved.