org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity
Class CapacitySchedulerConfiguration

java.lang.Object
  extended by org.apache.hadoop.conf.Configuration
      extended by org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacitySchedulerConfiguration
All Implemented Interfaces:
Iterable<Map.Entry<String,String>>, org.apache.hadoop.io.Writable

public class CapacitySchedulerConfiguration
extends org.apache.hadoop.conf.Configuration


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.conf.Configuration
org.apache.hadoop.conf.Configuration.DeprecationDelta, org.apache.hadoop.conf.Configuration.IntegerRanges
 
Field Summary
static String ALL_ACL
           
static String CAPACITY
           
static boolean DEFAULT_ENABLE_USER_METRICS
           
static float DEFAULT_MAXIMUM_APPLICATIONMASTERS_RESOURCE_PERCENT
           
static float DEFAULT_MAXIMUM_CAPACITY_VALUE
           
static int DEFAULT_MAXIMUM_SYSTEM_APPLICATIIONS
           
static int DEFAULT_NODE_LOCALITY_DELAY
           
static Class<? extends org.apache.hadoop.yarn.util.resource.ResourceCalculator> DEFAULT_RESOURCE_CALCULATOR_CLASS
           
static int DEFAULT_USER_LIMIT
           
static float DEFAULT_USER_LIMIT_FACTOR
           
static String DOT
           
static String ENABLE_USER_METRICS
           
static String MAXIMUM_AM_RESOURCE_SUFFIX
           
static String MAXIMUM_APPLICATION_MASTERS_RESOURCE_PERCENT
           
static String MAXIMUM_APPLICATIONS_SUFFIX
           
static String MAXIMUM_CAPACITY
           
static float MAXIMUM_CAPACITY_VALUE
           
static String MAXIMUM_SYSTEM_APPLICATIONS
           
static float MINIMUM_CAPACITY_VALUE
           
static String NODE_LOCALITY_DELAY
           
static String NONE_ACL
           
static String PREFIX
           
static String QUEUES
           
static String RESOURCE_CALCULATOR_CLASS
          ResourceComparator for scheduling.
static String ROOT
           
static String STATE
           
static float UNDEFINED
           
static String USER_LIMIT
           
static String USER_LIMIT_FACTOR
           
 
Constructor Summary
CapacitySchedulerConfiguration()
           
CapacitySchedulerConfiguration(org.apache.hadoop.conf.Configuration configuration)
           
 
Method Summary
 org.apache.hadoop.security.authorize.AccessControlList getAcl(String queue, org.apache.hadoop.yarn.api.records.QueueACL acl)
           
 Map<org.apache.hadoop.yarn.api.records.QueueACL,org.apache.hadoop.security.authorize.AccessControlList> getAcls(String queue)
           
 float getCapacity(String queue)
           
 boolean getEnableUserMetrics()
           
 org.apache.hadoop.yarn.api.records.Resource getMaximumAllocation()
           
 float getMaximumApplicationMasterResourcePercent()
           
 float getMaximumApplicationMasterResourcePerQueuePercent(String queue)
          Get the maximum am resource percent per queue setting.
 int getMaximumApplicationsPerQueue(String queue)
          Get the maximum applications per queue setting.
 float getMaximumCapacity(String queue)
           
 int getMaximumSystemApplications()
           
 org.apache.hadoop.yarn.api.records.Resource getMinimumAllocation()
           
 int getNodeLocalityDelay()
           
 String[] getQueues(String queue)
           
 org.apache.hadoop.yarn.util.resource.ResourceCalculator getResourceCalculator()
           
 org.apache.hadoop.yarn.api.records.QueueState getState(String queue)
           
 boolean getUsePortForNodeName()
           
 int getUserLimit(String queue)
           
 float getUserLimitFactor(String queue)
           
 void setAcl(String queue, org.apache.hadoop.yarn.api.records.QueueACL acl, String aclString)
           
 void setAcls(String queue, Map<org.apache.hadoop.yarn.api.records.QueueACL,org.apache.hadoop.security.authorize.AccessControlList> acls)
           
 void setCapacity(String queue, float capacity)
           
 void setMaximumCapacity(String queue, float maxCapacity)
           
 void setQueues(String queue, String[] subQueues)
           
 void setResourceComparator(Class<? extends org.apache.hadoop.yarn.util.resource.ResourceCalculator> resourceCalculatorClass)
           
 void setUserLimit(String queue, int userLimit)
           
 void setUserLimitFactor(String queue, float userLimitFactor)
           
 
Methods inherited from class org.apache.hadoop.conf.Configuration
addDefaultResource, addDeprecation, addDeprecation, addDeprecation, addDeprecation, addDeprecations, addResource, addResource, addResource, addResource, addResource, clear, dumpConfiguration, dumpDeprecatedKeys, get, get, getBoolean, getClass, getClass, getClassByName, getClassByNameOrNull, getClasses, getClassLoader, getConfResourceAsInputStream, getConfResourceAsReader, getDouble, getEnum, getFile, getFloat, getInstances, getInt, getInts, getLocalPath, getLong, getLongBytes, getPattern, getProperties, getPropertySources, getProps, getRange, getRaw, getResource, getSocketAddr, getStringCollection, getStrings, getStrings, getTimeDuration, getTrimmed, getTrimmed, getTrimmedStringCollection, getTrimmedStrings, getTrimmedStrings, getValByRegex, hasWarnedDeprecation, isDeprecated, iterator, main, readFields, reloadConfiguration, set, set, setBoolean, setBooleanIfUnset, setClass, setClassLoader, setDouble, setEnum, setFloat, setIfUnset, setInt, setLong, setPattern, setQuietMode, setSocketAddr, setStrings, setTimeDuration, size, toString, unset, updateConnectAddr, write, writeXml, writeXml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PREFIX

@InterfaceAudience.Private
public static final String PREFIX
See Also:
Constant Field Values

DOT

@InterfaceAudience.Private
public static final String DOT
See Also:
Constant Field Values

MAXIMUM_APPLICATIONS_SUFFIX

@InterfaceAudience.Private
public static final String MAXIMUM_APPLICATIONS_SUFFIX
See Also:
Constant Field Values

MAXIMUM_SYSTEM_APPLICATIONS

@InterfaceAudience.Private
public static final String MAXIMUM_SYSTEM_APPLICATIONS
See Also:
Constant Field Values

MAXIMUM_AM_RESOURCE_SUFFIX

@InterfaceAudience.Private
public static final String MAXIMUM_AM_RESOURCE_SUFFIX
See Also:
Constant Field Values

MAXIMUM_APPLICATION_MASTERS_RESOURCE_PERCENT

@InterfaceAudience.Private
public static final String MAXIMUM_APPLICATION_MASTERS_RESOURCE_PERCENT
See Also:
Constant Field Values

QUEUES

@InterfaceAudience.Private
public static final String QUEUES
See Also:
Constant Field Values

CAPACITY

@InterfaceAudience.Private
public static final String CAPACITY
See Also:
Constant Field Values

MAXIMUM_CAPACITY

@InterfaceAudience.Private
public static final String MAXIMUM_CAPACITY
See Also:
Constant Field Values

USER_LIMIT

@InterfaceAudience.Private
public static final String USER_LIMIT
See Also:
Constant Field Values

USER_LIMIT_FACTOR

@InterfaceAudience.Private
public static final String USER_LIMIT_FACTOR
See Also:
Constant Field Values

STATE

@InterfaceAudience.Private
public static final String STATE
See Also:
Constant Field Values

DEFAULT_MAXIMUM_SYSTEM_APPLICATIIONS

@InterfaceAudience.Private
public static final int DEFAULT_MAXIMUM_SYSTEM_APPLICATIIONS
See Also:
Constant Field Values

DEFAULT_MAXIMUM_APPLICATIONMASTERS_RESOURCE_PERCENT

@InterfaceAudience.Private
public static final float DEFAULT_MAXIMUM_APPLICATIONMASTERS_RESOURCE_PERCENT
See Also:
Constant Field Values

UNDEFINED

@InterfaceAudience.Private
public static final float UNDEFINED
See Also:
Constant Field Values

MINIMUM_CAPACITY_VALUE

@InterfaceAudience.Private
public static final float MINIMUM_CAPACITY_VALUE
See Also:
Constant Field Values

MAXIMUM_CAPACITY_VALUE

@InterfaceAudience.Private
public static final float MAXIMUM_CAPACITY_VALUE
See Also:
Constant Field Values

DEFAULT_MAXIMUM_CAPACITY_VALUE

@InterfaceAudience.Private
public static final float DEFAULT_MAXIMUM_CAPACITY_VALUE
See Also:
Constant Field Values

DEFAULT_USER_LIMIT

@InterfaceAudience.Private
public static final int DEFAULT_USER_LIMIT
See Also:
Constant Field Values

DEFAULT_USER_LIMIT_FACTOR

@InterfaceAudience.Private
public static final float DEFAULT_USER_LIMIT_FACTOR
See Also:
Constant Field Values

ALL_ACL

@InterfaceAudience.Private
public static final String ALL_ACL
See Also:
Constant Field Values

NONE_ACL

@InterfaceAudience.Private
public static final String NONE_ACL
See Also:
Constant Field Values

ENABLE_USER_METRICS

@InterfaceAudience.Private
public static final String ENABLE_USER_METRICS
See Also:
Constant Field Values

DEFAULT_ENABLE_USER_METRICS

@InterfaceAudience.Private
public static final boolean DEFAULT_ENABLE_USER_METRICS
See Also:
Constant Field Values

RESOURCE_CALCULATOR_CLASS

@InterfaceAudience.Private
public static final String RESOURCE_CALCULATOR_CLASS
ResourceComparator for scheduling.

See Also:
Constant Field Values

DEFAULT_RESOURCE_CALCULATOR_CLASS

@InterfaceAudience.Private
public static final Class<? extends org.apache.hadoop.yarn.util.resource.ResourceCalculator> DEFAULT_RESOURCE_CALCULATOR_CLASS

ROOT

@InterfaceAudience.Private
public static final String ROOT
See Also:
Constant Field Values

NODE_LOCALITY_DELAY

@InterfaceAudience.Private
public static final String NODE_LOCALITY_DELAY
See Also:
Constant Field Values

DEFAULT_NODE_LOCALITY_DELAY

@InterfaceAudience.Private
public static final int DEFAULT_NODE_LOCALITY_DELAY
See Also:
Constant Field Values
Constructor Detail

CapacitySchedulerConfiguration

public CapacitySchedulerConfiguration()

CapacitySchedulerConfiguration

public CapacitySchedulerConfiguration(org.apache.hadoop.conf.Configuration configuration)
Method Detail

getMaximumSystemApplications

public int getMaximumSystemApplications()

getMaximumApplicationMasterResourcePercent

public float getMaximumApplicationMasterResourcePercent()

getMaximumApplicationsPerQueue

public int getMaximumApplicationsPerQueue(String queue)
Get the maximum applications per queue setting.

Parameters:
queue - name of the queue
Returns:
setting specified or -1 if not set

getMaximumApplicationMasterResourcePerQueuePercent

public float getMaximumApplicationMasterResourcePerQueuePercent(String queue)
Get the maximum am resource percent per queue setting.

Parameters:
queue - name of the queue
Returns:
per queue setting or defaults to the global am-resource-percent setting if per queue setting not present

getCapacity

public float getCapacity(String queue)

setCapacity

public void setCapacity(String queue,
                        float capacity)

getMaximumCapacity

public float getMaximumCapacity(String queue)

setMaximumCapacity

public void setMaximumCapacity(String queue,
                               float maxCapacity)

getUserLimit

public int getUserLimit(String queue)

setUserLimit

public void setUserLimit(String queue,
                         int userLimit)

getUserLimitFactor

public float getUserLimitFactor(String queue)

setUserLimitFactor

public void setUserLimitFactor(String queue,
                               float userLimitFactor)

getState

public org.apache.hadoop.yarn.api.records.QueueState getState(String queue)

getAcl

public org.apache.hadoop.security.authorize.AccessControlList getAcl(String queue,
                                                                     org.apache.hadoop.yarn.api.records.QueueACL acl)

setAcl

public void setAcl(String queue,
                   org.apache.hadoop.yarn.api.records.QueueACL acl,
                   String aclString)

getAcls

public Map<org.apache.hadoop.yarn.api.records.QueueACL,org.apache.hadoop.security.authorize.AccessControlList> getAcls(String queue)

setAcls

public void setAcls(String queue,
                    Map<org.apache.hadoop.yarn.api.records.QueueACL,org.apache.hadoop.security.authorize.AccessControlList> acls)

getQueues

public String[] getQueues(String queue)

setQueues

public void setQueues(String queue,
                      String[] subQueues)

getMinimumAllocation

public org.apache.hadoop.yarn.api.records.Resource getMinimumAllocation()

getMaximumAllocation

public org.apache.hadoop.yarn.api.records.Resource getMaximumAllocation()

getEnableUserMetrics

public boolean getEnableUserMetrics()

getNodeLocalityDelay

public int getNodeLocalityDelay()

getResourceCalculator

public org.apache.hadoop.yarn.util.resource.ResourceCalculator getResourceCalculator()

getUsePortForNodeName

public boolean getUsePortForNodeName()

setResourceComparator

public void setResourceComparator(Class<? extends org.apache.hadoop.yarn.util.resource.ResourceCalculator> resourceCalculatorClass)


Copyright © 2014 Apache Software Foundation. All Rights Reserved.