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, Map<String,Float> queueMaxAMShares, int userMaxAppsDefault, int queueMaxAppsDefault, float queueMaxAMShareDefault, Map<String,SchedulingPolicy> schedulingPolicies, SchedulingPolicy defaultSchedulingPolicy, Map<String,Long> minSharePreemptionTimeouts, Map<String,Long> fairSharePreemptionTimeouts, Map<String,Float> fairSharePreemptionThresholds, Map<String,Map<org.apache.hadoop.yarn.api.records.QueueACL,org.apache.hadoop.security.authorize.AccessControlList>> queueAcls, QueuePlacementPolicy placementPolicy, Map<FSQueueType,Set<String>> configuredQueues)
           
 
Method Summary
 Map<FSQueueType,Set<String>> getConfiguredQueues()
           
 SchedulingPolicy getDefaultSchedulingPolicy()
           
 float getFairSharePreemptionThreshold(String queueName)
          Get a queue's fair share preemption threshold in the allocation file.
 long getFairSharePreemptionTimeout(String queueName)
          Get a queue's fair share preemption timeout configured in the allocation file, 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 configured in the allocation file, 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.
 float getQueueMaxAMShare(String queue)
           
 int getQueueMaxApps(String queue)
           
 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,
                               Map<String,Float> queueMaxAMShares,
                               int userMaxAppsDefault,
                               int queueMaxAppsDefault,
                               float queueMaxAMShareDefault,
                               Map<String,SchedulingPolicy> schedulingPolicies,
                               SchedulingPolicy defaultSchedulingPolicy,
                               Map<String,Long> minSharePreemptionTimeouts,
                               Map<String,Long> fairSharePreemptionTimeouts,
                               Map<String,Float> fairSharePreemptionThresholds,
                               Map<String,Map<org.apache.hadoop.yarn.api.records.QueueACL,org.apache.hadoop.security.authorize.AccessControlList>> queueAcls,
                               QueuePlacementPolicy placementPolicy,
                               Map<FSQueueType,Set<String>> configuredQueues)

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 configured in the allocation file, in milliseconds. Return -1 if not set.


getFairSharePreemptionTimeout

public long getFairSharePreemptionTimeout(String queueName)
Get a queue's fair share preemption timeout configured in the allocation file, in milliseconds. Return -1 if not set.


getFairSharePreemptionThreshold

public float getFairSharePreemptionThreshold(String queueName)
Get a queue's fair share preemption threshold in the allocation file. Return -1f if not set.


getQueueWeight

public ResourceWeights getQueueWeight(String queue)

getUserMaxApps

public int getUserMaxApps(String user)

getQueueMaxApps

public int getQueueMaxApps(String queue)

getQueueMaxAMShare

public float getQueueMaxAMShare(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()

getConfiguredQueues

public Map<FSQueueType,Set<String>> getConfiguredQueues()

getPlacementPolicy

public QueuePlacementPolicy getPlacementPolicy()


Copyright © 2014 Apache Software Foundation. All Rights Reserved.