public class CapacitySchedulerConfiguration extends ReservationSchedulerConfiguration
DEFAULT_CAPACITY_OVER_TIME_MULTIPLIER, DEFAULT_RESERVATION_ADMISSION_POLICY, DEFAULT_RESERVATION_AGENT_NAME, DEFAULT_RESERVATION_ENFORCEMENT_WINDOW, DEFAULT_RESERVATION_MOVE_ON_EXPIRY, DEFAULT_RESERVATION_PLANNER_NAME, DEFAULT_RESERVATION_WINDOW, DEFAULT_SHOW_RESERVATIONS_AS_QUEUES
Constructor and Description |
---|
CapacitySchedulerConfiguration() |
CapacitySchedulerConfiguration(org.apache.hadoop.conf.Configuration configuration) |
CapacitySchedulerConfiguration(org.apache.hadoop.conf.Configuration configuration,
boolean useLocalConfigurationProvider) |
Modifier and Type | Method and Description |
---|---|
Set<String> |
getAccessibleNodeLabels(String queue) |
org.apache.hadoop.security.authorize.AccessControlList |
getAcl(String queue,
org.apache.hadoop.yarn.api.records.QueueACL acl) |
Map<org.apache.hadoop.yarn.security.AccessType,org.apache.hadoop.security.authorize.AccessControlList> |
getAcls(String queue) |
Map<String,Float> |
getAllUserWeightsForQueue(String queuePath)
Get the weights of all users at this queue level from the configuration.
|
float |
getAverageCapacity(String queue)
Gets the average allowed capacity which will aggregated over the
ReservationSchedulerConfiguration.getReservationWindow(java.lang.String) by the
the SharingPolicy to check aggregate used capacity |
Set<String> |
getConfiguredNodeLabels(String queuePath)
Get configured node labels in a given queuePath
|
Integer |
getDefaultApplicationPriorityConfPerQueue(String queue) |
String |
getDefaultNodeLabelExpression(String queue) |
boolean |
getEnableUserMetrics() |
long |
getEnforcementWindow(String queue)
Gets the time in milliseconds for which the
Planner will verify
the Plan s satisfy the constraints |
float |
getInstantaneousMaxCapacity(String queue)
Gets the maximum capacity at any time that the
SharingPolicy allows |
float |
getLabeledQueueCapacity(String queue,
String label) |
float |
getLabeledQueueMaximumCapacity(String queue,
String label) |
boolean |
getLazyPreemptionEnabled() |
org.apache.hadoop.yarn.api.records.Resource |
getMaximumAllocation() |
org.apache.hadoop.yarn.api.records.Resource |
getMaximumAllocationPerQueue(String queue)
Get the per queue setting for the maximum limit to allocate to
each container request.
|
float |
getMaximumAMResourcePercentPerPartition(String queue,
String label) |
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.
|
int |
getMaximumSystemApplications() |
org.apache.hadoop.yarn.api.records.Resource |
getMinimumAllocation() |
boolean |
getMoveOnExpiry(String queue)
Gets whether the applications should be killed or moved to the parent queue
when the
ReservationDefinition expires |
int |
getNodeLocalityDelay() |
float |
getNonLabeledQueueCapacity(String queue) |
float |
getNonLabeledQueueMaximumCapacity(String queue) |
int |
getOffSwitchPerHeartbeatLimit() |
<S extends SchedulableEntity> |
getOrderingPolicy(String queue) |
boolean |
getOverrideWithQueueMappings() |
boolean |
getPreemptionDisabled(String queue,
boolean defaultVal)
Indicates whether preemption is disabled on the specified queue.
|
List<UserGroupMappingPlacementRule.QueueMapping> |
getQueueMappings()
Get user/group mappings to queues.
|
String[] |
getQueues(String queue) |
boolean |
getRackLocalityFullReset() |
String |
getReplanner(String queue)
Gets the name of the
Planner class associated with the
queue |
Map<org.apache.hadoop.yarn.api.records.ReservationACL,org.apache.hadoop.security.authorize.AccessControlList> |
getReservationAcls(String queue)
Gets a map containing the
AccessControlList of users for each
ReservationACL acl on thee specified queue. |
String |
getReservationAdmissionPolicy(String queue)
Gets the name of the
SharingPolicy class associated with the queue |
String |
getReservationAgent(String queue)
Gets the name of the
ReservationAgent class associated with the
queue |
boolean |
getReservationContinueLook() |
long |
getReservationWindow(String queue)
Gets the length of time in milliseconds for which the
SharingPolicy
checks for validity |
org.apache.hadoop.yarn.util.resource.ResourceCalculator |
getResourceCalculator() |
boolean |
getScheduleAynschronously() |
boolean |
getShowReservationAsQueues(String queuePath)
Checks whether the reservation queues be hidden or visible
|
org.apache.hadoop.yarn.api.records.QueueState |
getState(String queue) |
boolean |
getUsePortForNodeName() |
int |
getUserLimit(String queue) |
float |
getUserLimitFactor(String queue) |
boolean |
isReservable(String queue)
Checks if the queue participates in reservation based scheduling
|
void |
setAccessibleNodeLabels(String queue,
Set<String> labels) |
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 |
setAverageCapacity(String queue,
float avgCapacity) |
void |
setCapacity(String queue,
float capacity) |
void |
setCapacityByLabel(String queue,
String label,
float capacity) |
void |
setDefaultNodeLabelExpression(String queue,
String exp) |
void |
setInstantaneousMaxCapacity(String queue,
float instMaxCapacity) |
void |
setMaximumAMResourcePercentPerPartition(String queue,
String label,
float percent) |
void |
setMaximumApplicationMasterResourcePerQueuePercent(String queue,
float percent) |
void |
setMaximumCapacity(String queue,
float maxCapacity) |
void |
setMaximumCapacityByLabel(String queue,
String label,
float capacity) |
void |
setOffSwitchPerHeartbeatLimit(int limit) |
void |
setOrderingPolicy(String queue,
String policy) |
void |
setOrderingPolicyParameter(String queue,
String parameterKey,
String parameterValue) |
void |
setPreemptionDisabled(String queue,
boolean preemptionDisabled)
Sets the disable_preemption property in order to indicate
whether or not container preemption will be disabled for the specified
queue.
|
void |
setQueues(String queue,
String[] subQueues) |
void |
setReservable(String queue,
boolean isReservable) |
void |
setReservationAcls(String queue,
Map<org.apache.hadoop.yarn.api.records.ReservationACL,org.apache.hadoop.security.authorize.AccessControlList> acls) |
void |
setReservationAdmissionPolicy(String queue,
String reservationPolicy) |
void |
setReservationAgent(String queue,
String reservationPolicy) |
void |
setReservationWindow(String queue,
long reservationWindow) |
void |
setResourceComparator(Class<? extends org.apache.hadoop.yarn.util.resource.ResourceCalculator> resourceCalculatorClass) |
void |
setScheduleAynschronously(boolean async) |
void |
setUserLimit(String queue,
int userLimit) |
void |
setUserLimitFactor(String queue,
float userLimitFactor) |
addDefaultResource, addDeprecation, addDeprecation, addDeprecation, addDeprecation, addDeprecations, addResource, addResource, addResource, addResource, addResource, addResource, clear, dumpConfiguration, dumpDeprecatedKeys, get, get, getBoolean, getClass, getClass, getClassByName, getClassByNameOrNull, getClasses, getClassLoader, getConfResourceAsInputStream, getConfResourceAsReader, getDouble, getEnum, getFile, getFinalParameters, getFloat, getInstances, getInt, getInts, getLocalPath, getLong, getLongBytes, getPassword, getPasswordFromConfig, getPasswordFromCredentialProviders, getPattern, getPropertySources, getProps, getPropsWithPrefix, getRange, getRaw, getResource, getSocketAddr, getSocketAddr, getStringCollection, getStrings, getStrings, getTimeDuration, getTimeDurations, getTrimmed, getTrimmed, getTrimmedStringCollection, getTrimmedStrings, getTrimmedStrings, getValByRegex, hasWarnedDeprecation, isDeprecated, iterator, main, onlyKeyExists, readFields, reloadConfiguration, reloadExistingConfigurations, set, set, setAllowNullValueProperties, setBoolean, setBooleanIfUnset, setClass, setClassLoader, setDeprecatedProperties, setDouble, setEnum, setFloat, setIfUnset, setInt, setLong, setPattern, setQuietMode, setSocketAddr, setStrings, setTimeDuration, size, toString, unset, updateConnectAddr, updateConnectAddr, write, writeXml, writeXml
@InterfaceAudience.Private public static final String PREFIX
@InterfaceAudience.Private public static final String DOT
@InterfaceAudience.Private public static final String MAXIMUM_APPLICATIONS_SUFFIX
@InterfaceAudience.Private public static final String MAXIMUM_SYSTEM_APPLICATIONS
@InterfaceAudience.Private public static final String MAXIMUM_AM_RESOURCE_SUFFIX
@InterfaceAudience.Private public static final String MAXIMUM_APPLICATION_MASTERS_RESOURCE_PERCENT
@InterfaceAudience.Private public static final String QUEUES
@InterfaceAudience.Private public static final String CAPACITY
@InterfaceAudience.Private public static final String MAXIMUM_CAPACITY
@InterfaceAudience.Private public static final String USER_LIMIT
@InterfaceAudience.Private public static final String USER_LIMIT_FACTOR
@InterfaceAudience.Private public static final String USER_WEIGHT
@InterfaceAudience.Private public static final String USER_SETTINGS
@InterfaceAudience.Private public static final float DEFAULT_USER_WEIGHT
@InterfaceAudience.Private public static final String STATE
@InterfaceAudience.Private public static final String ACCESSIBLE_NODE_LABELS
@InterfaceAudience.Private public static final String DEFAULT_NODE_LABEL_EXPRESSION
public static final String RESERVE_CONT_LOOK_ALL_NODES
@InterfaceAudience.Private public static final boolean DEFAULT_RESERVE_CONT_LOOK_ALL_NODES
@InterfaceAudience.Private public static final String MAXIMUM_ALLOCATION_MB
@InterfaceAudience.Private public static final String MAXIMUM_ALLOCATION_VCORES
public static final String ORDERING_POLICY
public static final String FIFO_ORDERING_POLICY
public static final String FAIR_ORDERING_POLICY
public static final String DEFAULT_ORDERING_POLICY
@InterfaceAudience.Private public static final int DEFAULT_MAXIMUM_SYSTEM_APPLICATIIONS
@InterfaceAudience.Private public static final float DEFAULT_MAXIMUM_APPLICATIONMASTERS_RESOURCE_PERCENT
@InterfaceAudience.Private public static final float UNDEFINED
@InterfaceAudience.Private public static final float MINIMUM_CAPACITY_VALUE
@InterfaceAudience.Private public static final float MAXIMUM_CAPACITY_VALUE
@InterfaceAudience.Private public static final float DEFAULT_MAXIMUM_CAPACITY_VALUE
@InterfaceAudience.Private public static final int DEFAULT_USER_LIMIT
@InterfaceAudience.Private public static final float DEFAULT_USER_LIMIT_FACTOR
@InterfaceAudience.Private public static final String ALL_ACL
@InterfaceAudience.Private public static final String NONE_ACL
@InterfaceAudience.Private public static final String ENABLE_USER_METRICS
@InterfaceAudience.Private public static final boolean DEFAULT_ENABLE_USER_METRICS
@InterfaceAudience.Private public static final String RESOURCE_CALCULATOR_CLASS
@InterfaceAudience.Private public static final Class<? extends org.apache.hadoop.yarn.util.resource.ResourceCalculator> DEFAULT_RESOURCE_CALCULATOR_CLASS
@InterfaceAudience.Private public static final String ROOT
@InterfaceAudience.Private public static final String NODE_LOCALITY_DELAY
@InterfaceAudience.Private public static final int DEFAULT_NODE_LOCALITY_DELAY
@InterfaceAudience.Private public static final String RACK_LOCALITY_FULL_RESET
@InterfaceAudience.Private public static final int DEFAULT_OFFSWITCH_PER_HEARTBEAT_LIMIT
@InterfaceAudience.Private public static final String OFFSWITCH_PER_HEARTBEAT_LIMIT
@InterfaceAudience.Private public static final boolean DEFAULT_RACK_LOCALITY_FULL_RESET
@InterfaceAudience.Private public static final String SCHEDULE_ASYNCHRONOUSLY_PREFIX
@InterfaceAudience.Private public static final String SCHEDULE_ASYNCHRONOUSLY_ENABLE
@InterfaceAudience.Private public static final boolean DEFAULT_SCHEDULE_ASYNCHRONOUSLY_ENABLE
@InterfaceAudience.Private public static final String QUEUE_MAPPING
@InterfaceAudience.Private public static final String ENABLE_QUEUE_MAPPING_OVERRIDE
@InterfaceAudience.Private public static final boolean DEFAULT_ENABLE_QUEUE_MAPPING_OVERRIDE
@InterfaceAudience.Private public static final String QUEUE_PREEMPTION_DISABLED
@InterfaceAudience.Private public static final String DEFAULT_APPLICATION_PRIORITY
@InterfaceAudience.Private public static final Integer DEFAULT_CONFIGURATION_APPLICATION_PRIORITY
@InterfaceAudience.Private public static final String AVERAGE_CAPACITY
@InterfaceAudience.Private public static final String IS_RESERVABLE
@InterfaceAudience.Private public static final String RESERVATION_WINDOW
@InterfaceAudience.Private public static final String INSTANTANEOUS_MAX_CAPACITY
@InterfaceAudience.Private public static final String RESERVATION_ADMISSION_POLICY
@InterfaceAudience.Private public static final String RESERVATION_AGENT_NAME
@InterfaceAudience.Private public static final String RESERVATION_SHOW_RESERVATION_AS_QUEUE
@InterfaceAudience.Private public static final String RESERVATION_PLANNER_NAME
@InterfaceAudience.Private public static final String RESERVATION_MOVE_ON_EXPIRY
@InterfaceAudience.Private public static final String RESERVATION_ENFORCEMENT_WINDOW
@InterfaceAudience.Private public static final String LAZY_PREEMPTION_ENALBED
@InterfaceAudience.Private public static final boolean DEFAULT_LAZY_PREEMPTION_ENABLED
public static final String PREEMPTION_OBSERVE_ONLY
public static final boolean DEFAULT_PREEMPTION_OBSERVE_ONLY
public static final String PREEMPTION_MONITORING_INTERVAL
public static final long DEFAULT_PREEMPTION_MONITORING_INTERVAL
public static final String PREEMPTION_WAIT_TIME_BEFORE_KILL
public static final long DEFAULT_PREEMPTION_WAIT_TIME_BEFORE_KILL
public static final String TOTAL_PREEMPTION_PER_ROUND
public static final float DEFAULT_TOTAL_PREEMPTION_PER_ROUND
public static final String PREEMPTION_MAX_IGNORED_OVER_CAPACITY
public static final float DEFAULT_PREEMPTION_MAX_IGNORED_OVER_CAPACITY
public static final String PREEMPTION_NATURAL_TERMINATION_FACTOR
PREEMPTION_MAX_IGNORED_OVER_CAPACITY
). For example, a termination factor of 0.5
will reclaim almost 95% of resources within 5 * PREEMPTION_WAIT_TIME_BEFORE_KILL
, even absent natural termination.public static final float DEFAULT_PREEMPTION_NATURAL_TERMINATION_FACTOR
public static final String ADDITIONAL_RESOURCE_BALANCE_BASED_ON_RESERVED_CONTAINERS
public static final boolean DEFAULT_ADDITIONAL_RESOURCE_BALANCE_BASED_ON_RESERVED_CONTAINERS
public static final String PREEMPTION_SELECT_CANDIDATES_FOR_RESERVED_CONTAINERS
public static final boolean DEFAULT_PREEMPTION_SELECT_CANDIDATES_FOR_RESERVED_CONTAINERS
public static final String INTRAQUEUE_PREEMPTION_ENABLED
public static final boolean DEFAULT_INTRAQUEUE_PREEMPTION_ENABLED
public static final String INTRAQUEUE_PREEMPTION_MINIMUM_THRESHOLD
public static final float DEFAULT_INTRAQUEUE_PREEMPTION_MINIMUM_THRESHOLD
public static final String INTRAQUEUE_PREEMPTION_MAX_ALLOWABLE_LIMIT
public static final float DEFAULT_INTRAQUEUE_PREEMPTION_MAX_ALLOWABLE_LIMIT
public static final String INTRAQUEUE_PREEMPTION_ORDER_POLICY
public static final String DEFAULT_INTRAQUEUE_PREEMPTION_ORDER_POLICY
public CapacitySchedulerConfiguration()
public CapacitySchedulerConfiguration(org.apache.hadoop.conf.Configuration configuration)
public CapacitySchedulerConfiguration(org.apache.hadoop.conf.Configuration configuration, boolean useLocalConfigurationProvider)
public int getMaximumSystemApplications()
public float getMaximumApplicationMasterResourcePercent()
public int getMaximumApplicationsPerQueue(String queue)
queue
- name of the queuepublic float getMaximumApplicationMasterResourcePerQueuePercent(String queue)
queue
- name of the queuepublic void setMaximumApplicationMasterResourcePerQueuePercent(String queue, float percent)
public float getNonLabeledQueueCapacity(String queue)
public void setCapacity(String queue, float capacity)
public float getNonLabeledQueueMaximumCapacity(String queue)
public void setMaximumCapacity(String queue, float maxCapacity)
public void setMaximumCapacityByLabel(String queue, String label, float capacity)
public int getUserLimit(String queue)
public <S extends SchedulableEntity> OrderingPolicy<S> getOrderingPolicy(String queue)
public void setUserLimit(String queue, int userLimit)
public float getUserLimitFactor(String queue)
public void setUserLimitFactor(String queue, float userLimitFactor)
public org.apache.hadoop.yarn.api.records.QueueState getState(String queue)
public float getLabeledQueueMaximumCapacity(String queue, String label)
public float getMaximumAMResourcePercentPerPartition(String queue, String label)
public void setMaximumAMResourcePercentPerPartition(String queue, String label, float percent)
public boolean getReservationContinueLook()
public org.apache.hadoop.security.authorize.AccessControlList getAcl(String queue, org.apache.hadoop.yarn.api.records.QueueACL acl)
public void setAcl(String queue, org.apache.hadoop.yarn.api.records.QueueACL acl, String aclString)
public Map<org.apache.hadoop.yarn.api.records.ReservationACL,org.apache.hadoop.security.authorize.AccessControlList> getReservationAcls(String queue)
ReservationSchedulerConfiguration
AccessControlList
of users for each
ReservationACL
acl on thee specified queue.getReservationAcls
in class ReservationSchedulerConfiguration
queue
- the queue with which to check a user's permissions.ReservationACL
to AccessControlList
which contains a list of users that have the specified permission level.public Map<org.apache.hadoop.yarn.security.AccessType,org.apache.hadoop.security.authorize.AccessControlList> getAcls(String queue)
public void setAcls(String queue, Map<org.apache.hadoop.yarn.api.records.QueueACL,org.apache.hadoop.security.authorize.AccessControlList> acls)
public void setReservationAcls(String queue, Map<org.apache.hadoop.yarn.api.records.ReservationACL,org.apache.hadoop.security.authorize.AccessControlList> acls)
public org.apache.hadoop.yarn.api.records.Resource getMinimumAllocation()
public org.apache.hadoop.yarn.api.records.Resource getMaximumAllocation()
public org.apache.hadoop.yarn.api.records.Resource getMaximumAllocationPerQueue(String queue)
queue
- name of the queuepublic boolean getEnableUserMetrics()
public int getOffSwitchPerHeartbeatLimit()
public void setOffSwitchPerHeartbeatLimit(int limit)
public int getNodeLocalityDelay()
public boolean getRackLocalityFullReset()
public org.apache.hadoop.yarn.util.resource.ResourceCalculator getResourceCalculator()
public boolean getUsePortForNodeName()
public void setResourceComparator(Class<? extends org.apache.hadoop.yarn.util.resource.ResourceCalculator> resourceCalculatorClass)
public boolean getScheduleAynschronously()
public void setScheduleAynschronously(boolean async)
public boolean getOverrideWithQueueMappings()
public List<UserGroupMappingPlacementRule.QueueMapping> getQueueMappings()
public boolean isReservable(String queue)
ReservationSchedulerConfiguration
isReservable
in class ReservationSchedulerConfiguration
queue
- name of the queuepublic void setReservable(String queue, boolean isReservable)
public long getReservationWindow(String queue)
ReservationSchedulerConfiguration
SharingPolicy
checks for validitygetReservationWindow
in class ReservationSchedulerConfiguration
queue
- name of the queueSharingPolicy
public float getAverageCapacity(String queue)
ReservationSchedulerConfiguration
ReservationSchedulerConfiguration.getReservationWindow(java.lang.String)
by the
the SharingPolicy
to check aggregate used capacitygetAverageCapacity
in class ReservationSchedulerConfiguration
queue
- name of the queueSharingPolicy
public float getInstantaneousMaxCapacity(String queue)
ReservationSchedulerConfiguration
SharingPolicy
allowsgetInstantaneousMaxCapacity
in class ReservationSchedulerConfiguration
queue
- name of the queuepublic void setInstantaneousMaxCapacity(String queue, float instMaxCapacity)
public void setReservationWindow(String queue, long reservationWindow)
public void setAverageCapacity(String queue, float avgCapacity)
public String getReservationAdmissionPolicy(String queue)
ReservationSchedulerConfiguration
SharingPolicy
class associated with the queuegetReservationAdmissionPolicy
in class ReservationSchedulerConfiguration
queue
- name of the queueSharingPolicy
public void setReservationAdmissionPolicy(String queue, String reservationPolicy)
public String getReservationAgent(String queue)
ReservationSchedulerConfiguration
ReservationAgent
class associated with the
queuegetReservationAgent
in class ReservationSchedulerConfiguration
queue
- name of the queueReservationAgent
public boolean getShowReservationAsQueues(String queuePath)
ReservationSchedulerConfiguration
getShowReservationAsQueues
in class ReservationSchedulerConfiguration
queuePath
- name of the queuepublic String getReplanner(String queue)
ReservationSchedulerConfiguration
Planner
class associated with the
queuegetReplanner
in class ReservationSchedulerConfiguration
queue
- name of the queuePlanner
public boolean getMoveOnExpiry(String queue)
ReservationSchedulerConfiguration
ReservationDefinition
expiresgetMoveOnExpiry
in class ReservationSchedulerConfiguration
queue
- name of the queuepublic long getEnforcementWindow(String queue)
ReservationSchedulerConfiguration
Planner
will verify
the Plan
s satisfy the constraintsgetEnforcementWindow
in class ReservationSchedulerConfiguration
queue
- name of the queuepublic void setPreemptionDisabled(String queue, boolean preemptionDisabled)
queue
- queue pathpreemptionDisabled
- true if preemption is disabled on queuepublic boolean getPreemptionDisabled(String queue, boolean defaultVal)
queue
- queue path to querydefaultVal
- used as default if the disable_preemption
is not set in the configurationpublic Set<String> getConfiguredNodeLabels(String queuePath)
public Integer getDefaultApplicationPriorityConfPerQueue(String queue)
public void setOrderingPolicyParameter(String queue, String parameterKey, String parameterValue)
public boolean getLazyPreemptionEnabled()
public Map<String,Float> getAllUserWeightsForQueue(String queuePath)
queuePath
- full queue pathCopyright © 2017 Apache Software Foundation. All Rights Reserved.