Class CapacitySchedulerConfiguration
java.lang.Object
org.apache.hadoop.conf.Configuration
org.apache.hadoop.yarn.server.resourcemanager.reservation.ReservationSchedulerConfiguration
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacitySchedulerConfiguration
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDifferent resource types supported.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
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final StringBy default, reserved resource will be excluded while balancing capacities of queues.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected static final Stringstatic final Stringstatic final Stringstatic final StringFlag to determine whether or not to preempt containers from apps where some used resources are less than the user's user limit.static final booleanstatic final booleanstatic final booleanstatic final Stringstatic final Stringstatic final booleanstatic final booleanstatic final booleanstatic final longstatic final intstatic final Stringstatic final booleanstatic final intstatic final Integerstatic final Booleanstatic final booleanstatic final booleanstatic final booleanstatic final booleanstatic final Booleanstatic final booleanstatic final floatstatic final floatstatic final Stringstatic final booleanstatic final booleanstatic final Stringstatic final intAvoid potential risk that greedy assign multiple may involvestatic final intstatic final longstatic final floatstatic final floatstatic final intstatic final intstatic final booleanstatic final longstatic final Stringstatic final intstatic final Stringresource usage based node sorting algorithm.static final Stringstatic final intstatic final doublestatic final longstatic final doublestatic final booleanstatic final booleanstatic final booleanstatic final longstatic final longstatic final longstatic final Stringstatic final intstatic final booleanstatic final booleanstatic final Class<? extends org.apache.hadoop.yarn.util.resource.ResourceCalculator>static final Stringstatic final booleanstatic final longstatic final Integerstatic final booleanstatic final floatstatic final intstatic final floatstatic final floatstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFor intra-queue preemption, priority/user-limit/fairness based selectors can help to preempt containers.static final StringFor intra-queue preemption, allowable maximum-preemptable limit per queue.static final StringFor intra-queue preemption, consider those queues which are above used cap limit.static final StringFor intra-queue preemption, enforce a preemption order such as "userlimit_first" or "priority_first".static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringMaximum number of containers to assign on each check-in.static final Stringstatic final StringHow long we will wait to balance queues, by default it is 5 mins.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final floatstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final floatstatic final StringConfiguring absolute min/max resources in a queue.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringOrdering policy of queuesstatic final Stringstatic final StringMaximum amount of resources above the target capacity ignored for preemption.static final StringTime in milliseconds between invocations of this policystatic final StringGiven a computed preemption target, account for containers naturally expiring and preempt only this percentage of the delta.static final StringIf true, run the policy but do not affect the cluster with preemption and kill events.static final StringWhen calculating which containers to be preempted, we will try to preempt containers for reserved containers first.static final StringShould we allow queues continue grow after all queue reaches their guaranteed capacity.static final StringTime in milliseconds between requesting a preemption from an application and killing the container.static final Stringstatic final StringTime in milliseconds between invocations of QueueConfigurationAutoRefreshPolicy.static final StringMaximum application for a queue to be used when application per queue is not defined.To be consistent with previous version the default value is set as UNDEFINED.static final StringTime in milliseconds between invocations of this policystatic final Stringstatic final Stringstatic final Stringstatic final StringCombination of relative usage and prioritystatic final StringLess relative usage queue can get next resource, this is defaultstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringResourceComparator for scheduling.static final Patternstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringMaximum percentage of resources preemptionCandidates in a single round.static final floatstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Patternstatic final Stringstatic final StringFields inherited from class org.apache.hadoop.yarn.server.resourcemanager.reservation.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 Summary
ConstructorsConstructorDescriptionCapacitySchedulerConfiguration(org.apache.hadoop.conf.Configuration configuration) CapacitySchedulerConfiguration(org.apache.hadoop.conf.Configuration configuration, boolean useLocalConfigurationProvider) -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckConfigTypeIsAbsoluteResource(String label, QueuePath queue, Set<String> resourceTypes) getAccessibleNodeLabels(QueuePath queue) org.apache.hadoop.security.authorize.AccessControlListMap<org.apache.hadoop.yarn.security.AccessType,org.apache.hadoop.security.authorize.AccessControlList> static Map<org.apache.hadoop.yarn.security.AccessType,org.apache.hadoop.security.authorize.AccessControlList> Creates a mapping of queue ACLs for a Flexible Auto Created Leaf Queue.static Map<org.apache.hadoop.yarn.security.AccessType,org.apache.hadoop.security.authorize.AccessControlList> Creates a mapping of queue ACLs for a Flexible Auto Created Parent Queue.Map<org.apache.hadoop.yarn.security.AccessType,org.apache.hadoop.security.authorize.AccessControlList> getACLsForLegacyAutoCreatedLeafQueue(QueuePath parentQueuePath) Creates a mapping of queue ACLs for a Legacy Auto Created Leaf Queue.booleangetAllowZeroCapacitySum(QueuePath queue) getAllUserWeightsForQueue(QueuePath queuePath) Get the weights of all users at this queue level from the configuration.<S extends SchedulableEntity>
OrderingPolicy<S>getAppOrderingPolicy(QueuePath queue) booleanQueue Management computation policy for Auto Created queuesprotected AutoCreatedQueueManagementPolicyGet The policy class configured to manage capacities for auto created leaf queues under the specified parentintgetAutoCreatedQueuesMaxChildQueuesLimit(QueuePath queuePath) Get the max number of leaf queues that are allowed to be created under a parent queueintGet the max number of queues that are allowed to be created under a parent queue which allowed auto creation v2.longfloatgetAverageCapacity(QueuePath queue) Gets the average allowed capacity which will aggregated over theReservationSchedulerConfiguration.getReservationWindow(org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.QueuePath)by the theSharingPolicyto check aggregate used capacityorg.apache.hadoop.yarn.api.records.PriorityGet all configuration properties parsed in aConfigurationPropertiesobject.getConfiguredNodeLabels(QueuePath queuePath) Get configured node labels in a given queuePath.Get configured node labels for all queues that have accessible-node-labels prefixed properties set.org.apache.hadoop.yarn.api.records.QueueStategetConfiguredState(QueuePath queue) longbooleanlonggetEnforcementWindow(QueuePath queue) Gets the time in milliseconds for which thePlannerwill verify thePlans satisfy the constraintsintfloatGets the maximum capacity at any time that theSharingPolicyallowsbooleangetIntraQueuePreemptionDisabled(QueuePath queue, boolean defaultVal) Indicates whether intra-queue preemption is disabled on the specified queuefloatgetLabeledQueueCapacity(QueuePath queue, String label) floatgetLabeledQueueMaximumCapacity(QueuePath queue, String label) floatgetLabeledQueueWeight(QueuePath queue, String label) booleanintfloatgetMaximumAMResourcePercentPerPartition(QueuePath queue, String label) floatfloatGet the maximum am resource percent per queue setting.intGet the maximum applications per queue setting.intgetMaximumAutoCreatedQueueDepth(QueuePath queuePath) longorg.apache.hadoop.yarn.api.records.ResourcegetMaximumResourceRequirement(String label, QueuePath queue, Set<String> resourceTypes) Get absolute maximum resource requirement for a queue.intorg.apache.hadoop.yarn.api.records.Resourceorg.apache.hadoop.yarn.api.records.ResourcegetMinimumResourceRequirement(String label, QueuePath queue, Set<String> resourceTypes) Get absolute minimum resource requirement for a queue.booleangetMoveOnExpiry(QueuePath queue) Gets whether the applications should be killed or moved to the parent queue when theReservationDefinitionexpiresbooleanintfloatfloatfloatintbooleanbooleanbooleangetPreemptionDisabled(QueuePath queue, boolean defaultVal) Indicates whether preemption is disabled on the specified queue.booleangetPriorityAcls(QueuePath queue, org.apache.hadoop.yarn.api.records.Priority clusterMaxPriority) longWhen a reserved container of an underutilized queue is created.booleanDo we allow under-utilized queue with higher priority to preempt queue with lower priority *even if queue with lower priority is not satisfied*.booleanWhen doing preemption from under-satisfied queues for priority queue.static QueueCapacityConfigParsergetQueueMappingEntity(String queueMappingSuffix) Get user/group mappings to queues.org.apache.hadoop.yarn.api.records.ResourceGet maximum_allocation setting for the specified queue from the configuration.longintgetQueueOrderingPolicy(QueuePath queue, String parentPolicy) org.apache.hadoop.yarn.api.records.PrioritygetQueuePriority(QueuePath queue) intbooleangetReplanner(QueuePath queue) Gets the name of thePlannerclass associated with the queueMap<org.apache.hadoop.yarn.api.records.ReservationACL,org.apache.hadoop.security.authorize.AccessControlList> getReservationAcls(QueuePath queue) Gets a map containing theAccessControlListof users for eachReservationACLacl on thee specified queue.Gets the name of theSharingPolicyclass associated with the queuegetReservationAgent(QueuePath queue) Gets the name of theReservationAgentclass associated with the queuebooleanlonggetReservationWindow(QueuePath queue) Gets the length of time in milliseconds for which theSharingPolicychecks for validityorg.apache.hadoop.yarn.util.resource.ResourceCalculatorbooleanbooleanFail further auto leaf queue creation when parent's guaranteed capacity is exceeded.booleangetShowReservationAsQueues(QueuePath queuePath) Checks whether the reservation queues be hidden or visiblebooleanorg.apache.hadoop.yarn.api.records.QueueStatestatic StringbooleanfloatgetUserLimit(QueuePath queue) floatgetUserLimitFactor(QueuePath queue) booleanisAutoCreateChildQueueEnabled(QueuePath queuePath) If true, this queue will be created as a Parent Queue which Auto Created leaf child queuesbooleanisAutoExpiredDeletionEnabled(QueuePath queuePath) If true, auto created queue with weight mode will be deleted when queue is expired.booleanisAutoQueueCreationV2Enabled(QueuePath queuePath) booleanbooleanisReservable(QueuePath queue) Checks if the queue participates in reservation based schedulingparseConfiguredMaximumCapacityVector(QueuePath queuePath, Set<String> labels, QueueCapacityVector defaultVector) parseConfiguredResourceVector(QueuePath queuePath, Set<String> labels) voidReinitializes the cachedConfigurationPropertiesobject.voidsetAccessibleNodeLabels(QueuePath queue, Set<String> labels) voidvoidsetAcls(QueuePath queue, Map<org.apache.hadoop.yarn.api.records.QueueACL, org.apache.hadoop.security.authorize.AccessControlList> acls) voidsetAllowZeroCapacitySum(QueuePath queue, boolean value) voidsetAppNameMappings(List<QueueMapping> queueMappings) voidsetAutoCreateChildQueueEnabled(QueuePath queuePath, boolean autoCreationEnabled) voidsetAutoCreatedLeafQueueConfigCapacity(QueuePath queuePath, float val) voidsetAutoCreatedLeafQueueConfigDefaultNodeLabelExpression(QueuePath queuePath, String expression) voidsetAutoCreatedLeafQueueConfigMaxCapacity(QueuePath queuePath, float val) voidsetAutoCreatedLeafQueueConfigMaximumAllocation(QueuePath queuePath, String expression) voidsetAutoCreatedLeafQueueConfigUserLimit(QueuePath queuePath, int val) voidsetAutoCreatedLeafQueueConfigUserLimitFactor(QueuePath queuePath, float val) voidsetAutoCreatedLeafQueueTemplateCapacityByLabel(QueuePath queuePath, String label, float val) voidsetAutoCreatedLeafQueueTemplateCapacityByLabel(QueuePath queuePath, String label, org.apache.hadoop.yarn.api.records.Resource resource) voidsetAutoCreatedLeafQueueTemplateMaxCapacity(QueuePath queuePath, String label, float val) voidsetAutoCreatedLeafQueueTemplateMaxCapacity(QueuePath queuePath, String label, org.apache.hadoop.yarn.api.records.Resource resource) voidsetAutoCreatedQueuesV2MaxChildQueuesLimit(QueuePath queuePath, int maxQueues) voidsetAutoExpiredDeletionEnabled(QueuePath queuePath, boolean autoRemovalEnable) voidsetAutoExpiredDeletionTime(long time) voidsetAutoQueueCreationV2Enabled(QueuePath queuePath, boolean autoQueueCreation) voidsetAverageCapacity(QueuePath queue, float avgCapacity) voidsetCapacity(QueuePath queue, float capacity) voidsetCapacity(QueuePath queue, String absoluteResourceCapacity) voidsetCapacityByLabel(QueuePath queue, String label, float capacity) voidsetCapacityByLabel(QueuePath queue, String label, String absoluteResourceCapacity) voidsetCapacityVector(QueuePath queuePath, String label, String capacityVector) voidsetDefaultLifetimePerQueue(QueuePath queue, long defaultLifetime) voidsetDefaultMaxParallelApps(int value) voidsetDefaultMaxParallelAppsPerUser(int value) voidsetDefaultNodeLabelExpression(QueuePath queue, String exp) voidsetDefaultUserLimit(float defaultUserLimit) voidsetDefaultUserLimitFactor(float defaultUserLimitFactor) voidsetGlobalMaximumApplicationsPerQueue(int val) voidsetInstantaneousMaxCapacity(QueuePath queue, float instMaxCapacity) voidsetLabeledQueueWeight(QueuePath queue, String label, float weight) voidsetLegacyQueueModeEnabled(boolean value) voidsetMappingRuleFormat(String format) voidsetMappingRuleJson(String json) voidsetMaximumAMResourcePercentPerPartition(QueuePath queue, String label, float percent) voidsetMaximumApplicationMasterResourcePercent(float percent) voidsetMaximumApplicationMasterResourcePerQueuePercent(QueuePath queue, float percent) voidsetMaximumApplicationsPerQueue(QueuePath queue, int numMaxApps) voidsetMaximumAutoCreatedQueueDepth(int value) voidsetMaximumAutoCreatedQueueDepth(QueuePath queue, int value) voidsetMaximumCapacity(QueuePath queue, float maxCapacity) voidsetMaximumCapacityByLabel(QueuePath queue, String label, float capacity) voidsetMaximumCapacityByLabel(QueuePath queue, String label, String absoluteResourceCapacity) voidsetMaximumCapacityVector(QueuePath queuePath, String label, String capacityVector) voidsetMaximumLifetimePerQueue(QueuePath queue, long maximumLifetime) voidsetMaximumResourceRequirement(String label, QueuePath queue, org.apache.hadoop.yarn.api.records.Resource resource) voidsetMaximumSystemApplications(int numMaxApps) voidsetMaxParallelAppsForQueue(QueuePath queue, String value) voidsetMaxParallelAppsForUser(String user, int value) voidsetMinimumResourceRequirement(String label, QueuePath queue, org.apache.hadoop.yarn.api.records.Resource resource) voidsetNodeLocalityDelay(int nodeLocalityDelay) voidsetNonLabeledQueueWeight(QueuePath queue, float weight) voidsetOffSwitchPerHeartbeatLimit(int limit) voidsetOrderingPolicy(QueuePath queue, String policy) voidsetOrderingPolicyParameter(QueuePath queue, String parameterKey, String parameterValue) voidsetOverrideWithQueueMappings(boolean overrideWithQueueMappings) voidsetPreemptionDisabled(QueuePath queue, boolean preemptionDisabled) Sets the disable_preemption property in order to indicate whether or not container preemption will be disabled for the specified queue.voidsetPreemptionObserveOnly(boolean value) voidsetPriorityAcls(QueuePath queue, org.apache.hadoop.yarn.api.records.Priority priority, org.apache.hadoop.yarn.api.records.Priority defaultPriority, String[] acls) voidsetPUOrderingPolicyUnderUtilizedPreemptionDelay(long timeout) voidsetPUOrderingPolicyUnderUtilizedPreemptionEnabled(boolean enabled) voidsetPUOrderingPolicyUnderUtilizedPreemptionMoveReservation(boolean allowMoveReservation) voidsetQueueMappingEntities(List<QueueMapping> queueMappings, String queueMappingSuffix) voidsetQueueMappings(List<QueueMapping> queueMappings) voidsetQueueMaximumAllocation(QueuePath queue, String maximumAllocation) voidsetQueueMaximumAllocationMb(QueuePath queue, int value) voidsetQueueMaximumAllocationVcores(QueuePath queue, int value) voidsetQueueOrderingPolicy(QueuePath queue, String policy) voidsetQueuePlacementRules(Collection<String> queuePlacementRules) voidsetQueuePriority(QueuePath queue, int priority) voidvoidsetReservable(QueuePath queue, boolean isReservable) voidsetReservationAcls(QueuePath queue, Map<org.apache.hadoop.yarn.api.records.ReservationACL, org.apache.hadoop.security.authorize.AccessControlList> acls) voidsetReservationAdmissionPolicy(QueuePath queue, String reservationPolicy) voidsetReservationAgent(QueuePath queue, String reservationPolicy) voidsetReservationWindow(QueuePath queue, long reservationWindow) voidsetResourceComparator(Class<? extends org.apache.hadoop.yarn.util.resource.ResourceCalculator> resourceCalculatorClass) voidsetScheduleAynschronously(boolean async) voidsetShouldFailAutoQueueCreationWhenGuaranteedCapacityExceeded(QueuePath queuePath, boolean autoCreationEnabled) voidvoidsetUserLimit(QueuePath queue, float userLimit) voidsetUserLimitFactor(QueuePath queuePath, float userLimitFactor) static booleanshouldAppFailFast(org.apache.hadoop.conf.Configuration conf) Methods inherited from class org.apache.hadoop.conf.Configuration
addDefaultResource, addDeprecation, addDeprecation, addDeprecation, addDeprecation, addDeprecations, addResource, addResource, addResource, addResource, addResource, addResource, addResource, addResource, addResource, addResource, addResource, addTags, clear, dumpConfiguration, dumpConfiguration, dumpDeprecatedKeys, get, get, getAllPropertiesByTag, getAllPropertiesByTags, getBoolean, getClass, getClass, getClassByName, getClassByNameOrNull, getClasses, getClassLoader, getConfResourceAsInputStream, getConfResourceAsReader, getDouble, getEnum, getEnumSet, getFile, getFinalParameters, getFloat, getInstances, getInt, getInts, getLocalPath, getLong, getLongBytes, getPassword, getPasswordFromConfig, getPasswordFromCredentialProviders, getPattern, getPropertySources, getProps, getPropsWithPrefix, getRange, getRaw, getResource, getSocketAddr, getSocketAddr, getStorageSize, getStorageSize, getStringCollection, getStrings, getStrings, getTimeDuration, getTimeDuration, getTimeDuration, getTimeDuration, getTimeDurationHelper, getTimeDurations, getTrimmed, getTrimmed, getTrimmedStringCollection, getTrimmedStrings, getTrimmedStrings, getValByRegex, hasWarnedDeprecation, isDeprecated, isPropertyTag, iterator, main, onlyKeyExists, readFields, reloadConfiguration, reloadExistingConfigurations, set, set, setAllowNullValueProperties, setBoolean, setBooleanIfUnset, setClass, setClassLoader, setDeprecatedProperties, setDouble, setEnum, setFloat, setIfUnset, setInt, setLong, setPattern, setQuietMode, setRestrictSystemProperties, setRestrictSystemPropertiesDefault, setRestrictSystemProps, setSocketAddr, setStorageSize, setStrings, setTimeDuration, size, substituteCommonVariables, toString, unset, updateConnectAddr, updateConnectAddr, write, writeXml, writeXml, writeXml, writeXmlMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
PREFIX
- See Also:
-
DOT
- See Also:
-
MAXIMUM_APPLICATIONS_SUFFIX
- See Also:
-
MAXIMUM_SYSTEM_APPLICATIONS
- See Also:
-
MAXIMUM_AM_RESOURCE_SUFFIX
- See Also:
-
MAXIMUM_APPLICATION_MASTERS_RESOURCE_PERCENT
- See Also:
-
QUEUES
- See Also:
-
CAPACITY
- See Also:
-
MAXIMUM_CAPACITY
- See Also:
-
USER_LIMIT
- See Also:
-
USER_LIMIT_FACTOR
- See Also:
-
USER_WEIGHT
- See Also:
-
USER_SETTINGS
- See Also:
-
USER_WEIGHT_REGEX
- See Also:
-
USER_WEIGHT_PATTERN
-
DEFAULT_USER_WEIGHT
@Private public static final float DEFAULT_USER_WEIGHT- See Also:
-
STATE
- See Also:
-
ACCESSIBLE_NODE_LABELS
- See Also:
-
DEFAULT_NODE_LABEL_EXPRESSION
- See Also:
-
RESERVE_CONT_LOOK_ALL_NODES
- See Also:
-
DEFAULT_RESERVE_CONT_LOOK_ALL_NODES
@Private public static final boolean DEFAULT_RESERVE_CONT_LOOK_ALL_NODES- See Also:
-
SKIP_ALLOCATE_ON_NODES_WITH_RESERVED_CONTAINERS
- See Also:
-
DEFAULT_SKIP_ALLOCATE_ON_NODES_WITH_RESERVED_CONTAINERS
@Private public static final boolean DEFAULT_SKIP_ALLOCATE_ON_NODES_WITH_RESERVED_CONTAINERS- See Also:
-
MAXIMUM_ALLOCATION
- See Also:
-
MAXIMUM_ALLOCATION_MB
- See Also:
-
MAXIMUM_ALLOCATION_VCORES
- See Also:
-
ORDERING_POLICY
Ordering policy of queues- See Also:
-
FIFO_APP_ORDERING_POLICY
- See Also:
-
FAIR_APP_ORDERING_POLICY
- See Also:
-
FIFO_WITH_PARTITIONS_APP_ORDERING_POLICY
- See Also:
-
FIFO_FOR_PENDING_APPS
- See Also:
-
DEFAULT_APP_ORDERING_POLICY
- See Also:
-
DEFAULT_MAXIMUM_SYSTEM_APPLICATIIONS
@Private public static final int DEFAULT_MAXIMUM_SYSTEM_APPLICATIIONS- See Also:
-
DEFAULT_MAXIMUM_APPLICATIONMASTERS_RESOURCE_PERCENT
@Private public static final float DEFAULT_MAXIMUM_APPLICATIONMASTERS_RESOURCE_PERCENT- See Also:
-
UNDEFINED
@Private public static final float UNDEFINED- See Also:
-
MINIMUM_CAPACITY_VALUE
@Private public static final float MINIMUM_CAPACITY_VALUE- See Also:
-
MAXIMUM_CAPACITY_VALUE
@Private public static final float MAXIMUM_CAPACITY_VALUE- See Also:
-
DEFAULT_MAXIMUM_CAPACITY_VALUE
@Private public static final float DEFAULT_MAXIMUM_CAPACITY_VALUE- See Also:
-
DEFAULT_USER_LIMIT
@Private public static final int DEFAULT_USER_LIMIT- See Also:
-
DEFAULT_USER_LIMIT_FACTOR
@Private public static final float DEFAULT_USER_LIMIT_FACTOR- See Also:
-
ALL_ACL
- See Also:
-
NONE_ACL
- See Also:
-
ENABLE_USER_METRICS
- See Also:
-
DEFAULT_ENABLE_USER_METRICS
@Private public static final boolean DEFAULT_ENABLE_USER_METRICS- See Also:
-
RESOURCE_CALCULATOR_CLASS
ResourceComparator for scheduling.- See Also:
-
DEFAULT_RESOURCE_CALCULATOR_CLASS
@Private public static final Class<? extends org.apache.hadoop.yarn.util.resource.ResourceCalculator> DEFAULT_RESOURCE_CALCULATOR_CLASS -
ROOT
- See Also:
-
NODE_LOCALITY_DELAY
- See Also:
-
DEFAULT_NODE_LOCALITY_DELAY
@Private public static final int DEFAULT_NODE_LOCALITY_DELAY- See Also:
-
RACK_LOCALITY_ADDITIONAL_DELAY
- See Also:
-
DEFAULT_RACK_LOCALITY_ADDITIONAL_DELAY
@Private public static final int DEFAULT_RACK_LOCALITY_ADDITIONAL_DELAY- See Also:
-
RACK_LOCALITY_FULL_RESET
- See Also:
-
DEFAULT_OFFSWITCH_PER_HEARTBEAT_LIMIT
@Private public static final int DEFAULT_OFFSWITCH_PER_HEARTBEAT_LIMIT- See Also:
-
OFFSWITCH_PER_HEARTBEAT_LIMIT
- See Also:
-
DEFAULT_RACK_LOCALITY_FULL_RESET
@Private public static final boolean DEFAULT_RACK_LOCALITY_FULL_RESET- See Also:
-
SCHEDULE_ASYNCHRONOUSLY_PREFIX
- See Also:
-
SCHEDULE_ASYNCHRONOUSLY_ENABLE
- See Also:
-
SCHEDULE_ASYNCHRONOUSLY_MAXIMUM_THREAD
- See Also:
-
SCHEDULE_ASYNCHRONOUSLY_MAXIMUM_PENDING_BACKLOGS
- See Also:
-
SCHEDULE_ASYNCHRONOUSLY_INTERVAL
- See Also:
-
DEFAULT_SCHEDULE_ASYNCHRONOUSLY_INTERVAL
@Private public static final long DEFAULT_SCHEDULE_ASYNCHRONOUSLY_INTERVAL- See Also:
-
APP_FAIL_FAST
- See Also:
-
DEFAULT_APP_FAIL_FAST
@Private public static final boolean DEFAULT_APP_FAIL_FAST- See Also:
-
DEFAULT_SCHEDULE_ASYNCHRONOUSLY_MAXIMUM_PENDING_BACKLOGS
-
DEFAULT_SCHEDULE_ASYNCHRONOUSLY_ENABLE
@Private public static final boolean DEFAULT_SCHEDULE_ASYNCHRONOUSLY_ENABLE- See Also:
-
QUEUE_MAPPING
- See Also:
-
QUEUE_MAPPING_NAME
- See Also:
-
ENABLE_QUEUE_MAPPING_OVERRIDE
- See Also:
-
DEFAULT_ENABLE_QUEUE_MAPPING_OVERRIDE
@Private public static final boolean DEFAULT_ENABLE_QUEUE_MAPPING_OVERRIDE- See Also:
-
WORKFLOW_PRIORITY_MAPPINGS
- See Also:
-
ENABLE_WORKFLOW_PRIORITY_MAPPINGS_OVERRIDE
- See Also:
-
DEFAULT_ENABLE_WORKFLOW_PRIORITY_MAPPINGS_OVERRIDE
@Private public static final boolean DEFAULT_ENABLE_WORKFLOW_PRIORITY_MAPPINGS_OVERRIDE- See Also:
-
QUEUE_PREEMPTION_DISABLED
- See Also:
-
DEFAULT_APPLICATION_PRIORITY
- See Also:
-
DEFAULT_CONFIGURATION_APPLICATION_PRIORITY
-
AVERAGE_CAPACITY
- See Also:
-
IS_RESERVABLE
- See Also:
-
RESERVATION_WINDOW
- See Also:
-
INSTANTANEOUS_MAX_CAPACITY
- See Also:
-
RESERVATION_ADMISSION_POLICY
- See Also:
-
RESERVATION_AGENT_NAME
- See Also:
-
RESERVATION_SHOW_RESERVATION_AS_QUEUE
- See Also:
-
RESERVATION_PLANNER_NAME
- See Also:
-
RESERVATION_MOVE_ON_EXPIRY
- See Also:
-
RESERVATION_ENFORCEMENT_WINDOW
- See Also:
-
LAZY_PREEMPTION_ENABLED
- See Also:
-
DEFAULT_LAZY_PREEMPTION_ENABLED
@Private public static final boolean DEFAULT_LAZY_PREEMPTION_ENABLED- See Also:
-
ASSIGN_MULTIPLE_ENABLED
- See Also:
-
DEFAULT_ASSIGN_MULTIPLE_ENABLED
@Private public static final boolean DEFAULT_ASSIGN_MULTIPLE_ENABLED- See Also:
-
MAX_ASSIGN_PER_HEARTBEAT
Maximum number of containers to assign on each check-in.- See Also:
-
DEFAULT_MAX_ASSIGN_PER_HEARTBEAT
@Private public static final int DEFAULT_MAX_ASSIGN_PER_HEARTBEATAvoid potential risk that greedy assign multiple may involve- See Also:
-
MINIMUM_RESOURCE
Configuring absolute min/max resources in a queue.- See Also:
-
MAXIMUM_RESOURCE
- See Also:
-
DEFAULT_RESOURCE_TYPES
- See Also:
-
PATTERN_FOR_ABSOLUTE_RESOURCE
- See Also:
-
RESOURCE_PATTERN
-
MAX_PARALLEL_APPLICATIONS
- See Also:
-
DEFAULT_MAX_PARALLEL_APPLICATIONS
public static final int DEFAULT_MAX_PARALLEL_APPLICATIONS- See Also:
-
ALLOW_ZERO_CAPACITY_SUM
- See Also:
-
DEFAULT_ALLOW_ZERO_CAPACITY_SUM
public static final boolean DEFAULT_ALLOW_ZERO_CAPACITY_SUM- See Also:
-
MAPPING_RULE_FORMAT
- See Also:
-
MAPPING_RULE_JSON
- See Also:
-
MAPPING_RULE_JSON_FILE
- See Also:
-
MAPPING_RULE_FORMAT_LEGACY
- See Also:
-
MAPPING_RULE_FORMAT_JSON
- See Also:
-
MAPPING_RULE_FORMAT_DEFAULT
- See Also:
-
DEFAULT_LEGACY_QUEUE_MODE
public static final boolean DEFAULT_LEGACY_QUEUE_MODE- See Also:
-
PREEMPTION_OBSERVE_ONLY
If true, run the policy but do not affect the cluster with preemption and kill events.- See Also:
-
DEFAULT_PREEMPTION_OBSERVE_ONLY
public static final boolean DEFAULT_PREEMPTION_OBSERVE_ONLY- See Also:
-
PREEMPTION_MONITORING_INTERVAL
Time in milliseconds between invocations of this policy- See Also:
-
DEFAULT_PREEMPTION_MONITORING_INTERVAL
public static final long DEFAULT_PREEMPTION_MONITORING_INTERVAL- See Also:
-
PREEMPTION_WAIT_TIME_BEFORE_KILL
Time in milliseconds between requesting a preemption from an application and killing the container.- See Also:
-
DEFAULT_PREEMPTION_WAIT_TIME_BEFORE_KILL
public static final long DEFAULT_PREEMPTION_WAIT_TIME_BEFORE_KILL- See Also:
-
TOTAL_PREEMPTION_PER_ROUND
Maximum percentage of resources preemptionCandidates in a single round. By controlling this value one can throttle the pace at which containers are reclaimed from the cluster. After computing the total desired preemption, the policy scales it back within this limit.- See Also:
-
DEFAULT_TOTAL_PREEMPTION_PER_ROUND
public static final float DEFAULT_TOTAL_PREEMPTION_PER_ROUND- See Also:
-
PREEMPTION_MAX_IGNORED_OVER_CAPACITY
Maximum amount of resources above the target capacity ignored for preemption. This defines a deadzone around the target capacity that helps prevent thrashing and oscillations around the computed target balance. High values would slow the time to capacity and (absent natural completions) it might prevent convergence to guaranteed capacity.- See Also:
-
DEFAULT_PREEMPTION_MAX_IGNORED_OVER_CAPACITY
public static final double DEFAULT_PREEMPTION_MAX_IGNORED_OVER_CAPACITY- See Also:
-
PREEMPTION_NATURAL_TERMINATION_FACTOR
Given a computed preemption target, account for containers naturally expiring and preempt only this percentage of the delta. This determines the rate of geometric convergence into the deadzone (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.- See Also:
-
DEFAULT_PREEMPTION_NATURAL_TERMINATION_FACTOR
public static final double DEFAULT_PREEMPTION_NATURAL_TERMINATION_FACTOR- See Also:
-
ADDITIONAL_RESOURCE_BALANCE_BASED_ON_RESERVED_CONTAINERS
By default, reserved resource will be excluded while balancing capacities of queues. Why doing this? In YARN-4390, we added preemption-based-on-reserved-container Support. To reduce unnecessary preemption for large containers. We will not include reserved resources while calculating ideal-allocation in FifoCandidatesSelector. Changes in YARN-4390 will significantly reduce number of containers preempted When cluster has heterogeneous container requests. (Please check test report: https://issues.apache.org/jira/secure/attachment/12796197/YARN-4390-test-results.pdf However, on the other hand, in some corner cases, especially for fragmented cluster. It could lead to preemption cannot kick in in some cases. Please see YARN-5731. So to solve the problem, make this change to be configurable, and please note that it is an experimental option.- See Also:
-
DEFAULT_ADDITIONAL_RESOURCE_BALANCE_BASED_ON_RESERVED_CONTAINERS
public static final boolean DEFAULT_ADDITIONAL_RESOURCE_BALANCE_BASED_ON_RESERVED_CONTAINERS- See Also:
-
PREEMPTION_SELECT_CANDIDATES_FOR_RESERVED_CONTAINERS
When calculating which containers to be preempted, we will try to preempt containers for reserved containers first. By default is false.- See Also:
-
DEFAULT_PREEMPTION_SELECT_CANDIDATES_FOR_RESERVED_CONTAINERS
public static final boolean DEFAULT_PREEMPTION_SELECT_CANDIDATES_FOR_RESERVED_CONTAINERS- See Also:
-
INTRAQUEUE_PREEMPTION_ENABLED
For intra-queue preemption, priority/user-limit/fairness based selectors can help to preempt containers.- See Also:
-
DEFAULT_INTRAQUEUE_PREEMPTION_ENABLED
public static final boolean DEFAULT_INTRAQUEUE_PREEMPTION_ENABLED- See Also:
-
INTRAQUEUE_PREEMPTION_MINIMUM_THRESHOLD
For intra-queue preemption, consider those queues which are above used cap limit.- See Also:
-
DEFAULT_INTRAQUEUE_PREEMPTION_MINIMUM_THRESHOLD
public static final float DEFAULT_INTRAQUEUE_PREEMPTION_MINIMUM_THRESHOLD- See Also:
-
INTRAQUEUE_PREEMPTION_MAX_ALLOWABLE_LIMIT
For intra-queue preemption, allowable maximum-preemptable limit per queue.- See Also:
-
DEFAULT_INTRAQUEUE_PREEMPTION_MAX_ALLOWABLE_LIMIT
public static final float DEFAULT_INTRAQUEUE_PREEMPTION_MAX_ALLOWABLE_LIMIT- See Also:
-
INTRAQUEUE_PREEMPTION_ORDER_POLICY
For intra-queue preemption, enforce a preemption order such as "userlimit_first" or "priority_first".- See Also:
-
DEFAULT_INTRAQUEUE_PREEMPTION_ORDER_POLICY
- See Also:
-
CROSS_QUEUE_PREEMPTION_CONSERVATIVE_DRF
Flag to determine whether or not to preempt containers from apps where some used resources are less than the user's user limit.- See Also:
-
DEFAULT_CROSS_QUEUE_PREEMPTION_CONSERVATIVE_DRF
-
IN_QUEUE_PREEMPTION_CONSERVATIVE_DRF
- See Also:
-
DEFAULT_IN_QUEUE_PREEMPTION_CONSERVATIVE_DRF
-
PREEMPTION_TO_BALANCE_QUEUES_BEYOND_GUARANTEED
Should we allow queues continue grow after all queue reaches their guaranteed capacity.- See Also:
-
DEFAULT_PREEMPTION_TO_BALANCE_QUEUES_BEYOND_GUARANTEED
public static final boolean DEFAULT_PREEMPTION_TO_BALANCE_QUEUES_BEYOND_GUARANTEED- See Also:
-
MAX_WAIT_BEFORE_KILL_FOR_QUEUE_BALANCE_PREEMPTION
How long we will wait to balance queues, by default it is 5 mins.- See Also:
-
DEFAULT_MAX_WAIT_BEFORE_KILL_FOR_QUEUE_BALANCE_PREEMPTION
public static final long DEFAULT_MAX_WAIT_BEFORE_KILL_FOR_QUEUE_BALANCE_PREEMPTION- See Also:
-
QUEUE_GLOBAL_MAX_APPLICATION
Maximum application for a queue to be used when application per queue is not defined.To be consistent with previous version the default value is set as UNDEFINED.- See Also:
-
QUEUE_UTILIZATION_ORDERING_POLICY
Less relative usage queue can get next resource, this is default- See Also:
-
QUEUE_PRIORITY_UTILIZATION_ORDERING_POLICY
Combination of relative usage and priority- See Also:
-
DEFAULT_QUEUE_ORDERING_POLICY
- See Also:
-
MAXIMUM_LIFETIME_SUFFIX
- See Also:
-
DEFAULT_LIFETIME_SUFFIX
- See Also:
-
DEFAULT_AUTO_CREATE_CHILD_QUEUE_ENABLED
@Private public static final boolean DEFAULT_AUTO_CREATE_CHILD_QUEUE_ENABLED- See Also:
-
AUTO_CREATE_CHILD_QUEUE_ENABLED
- See Also:
-
AUTO_QUEUE_CREATION_V2_PREFIX
- See Also:
-
AUTO_QUEUE_CREATION_V2_ENABLED
- See Also:
-
AUTO_QUEUE_CREATION_V2_MAX_QUEUES
- See Also:
-
DEFAULT_AUTO_QUEUE_CREATION_V2_MAX_QUEUES
@Private public static final int DEFAULT_AUTO_QUEUE_CREATION_V2_MAX_QUEUES- See Also:
-
MAXIMUM_QUEUE_DEPTH
- See Also:
-
DEFAULT_MAXIMUM_QUEUE_DEPTH
@Private public static final int DEFAULT_MAXIMUM_QUEUE_DEPTH- See Also:
-
DEFAULT_AUTO_QUEUE_CREATION_ENABLED
@Private public static final boolean DEFAULT_AUTO_QUEUE_CREATION_ENABLED- See Also:
-
AUTO_CREATED_LEAF_QUEUE_TEMPLATE_PREFIX
- See Also:
-
AUTO_CREATE_QUEUE_MAX_QUEUES
- See Also:
-
DEFAULT_AUTO_CREATE_QUEUE_MAX_QUEUES
@Private public static final int DEFAULT_AUTO_CREATE_QUEUE_MAX_QUEUES- See Also:
-
FAIL_AUTO_CREATION_ON_EXCEEDING_CAPACITY
- See Also:
-
DEFAULT_FAIL_AUTO_CREATION_ON_EXCEEDING_CAPACITY
@Private public static final boolean DEFAULT_FAIL_AUTO_CREATION_ON_EXCEEDING_CAPACITY- See Also:
-
AUTO_CREATED_QUEUE_MANAGEMENT_POLICY
- See Also:
-
DEFAULT_AUTO_CREATED_QUEUE_MANAGEMENT_POLICY
- See Also:
-
QUEUE_MANAGEMENT_MONITORING_INTERVAL
Time in milliseconds between invocations of this policy- See Also:
-
DEFAULT_QUEUE_MANAGEMENT_MONITORING_INTERVAL
@Private public static final long DEFAULT_QUEUE_MANAGEMENT_MONITORING_INTERVAL- See Also:
-
DEFAULT_AUTO_CREATE_CHILD_QUEUE_AUTO_REMOVAL_ENABLE
@Private public static final boolean DEFAULT_AUTO_CREATE_CHILD_QUEUE_AUTO_REMOVAL_ENABLE- See Also:
-
AUTO_CREATE_CHILD_QUEUE_AUTO_REMOVAL_ENABLE
- See Also:
-
DEFAULT_AUTO_CREATE_CHILD_QUEUE_EXPIRED_TIME
@Private public static final long DEFAULT_AUTO_CREATE_CHILD_QUEUE_EXPIRED_TIME- See Also:
-
AUTO_CREATE_CHILD_QUEUE_EXPIRED_TIME
- See Also:
-
QUEUE_AUTO_REFRESH_MONITORING_INTERVAL
Time in milliseconds between invocations of QueueConfigurationAutoRefreshPolicy.- See Also:
-
DEFAULT_QUEUE_AUTO_REFRESH_MONITORING_INTERVAL
@Private public static final long DEFAULT_QUEUE_AUTO_REFRESH_MONITORING_INTERVAL- See Also:
-
MULTI_NODE_SORTING_POLICIES
- See Also:
-
MULTI_NODE_SORTING_POLICY_NAME
- See Also:
-
DEFAULT_NODE_SORTING_POLICY
resource usage based node sorting algorithm.- See Also:
-
DEFAULT_NODE_SORTING_POLICY_CLASSNAME
- See Also:
-
DEFAULT_MULTI_NODE_SORTING_INTERVAL
public static final long DEFAULT_MULTI_NODE_SORTING_INTERVAL- See Also:
-
MULTI_NODE_PLACEMENT_ENABLED
- See Also:
-
DEFAULT_MULTI_NODE_PLACEMENT_ENABLED
@Private public static final boolean DEFAULT_MULTI_NODE_PLACEMENT_ENABLED- See Also:
-
-
Constructor Details
-
CapacitySchedulerConfiguration
public CapacitySchedulerConfiguration() -
CapacitySchedulerConfiguration
public CapacitySchedulerConfiguration(org.apache.hadoop.conf.Configuration configuration) -
CapacitySchedulerConfiguration
public CapacitySchedulerConfiguration(org.apache.hadoop.conf.Configuration configuration, boolean useLocalConfigurationProvider)
-
-
Method Details
-
getQueueCapacityConfigParser
-
getMaximumAutoCreatedQueueDepth
-
setMaximumAutoCreatedQueueDepth
-
setMaximumAutoCreatedQueueDepth
public void setMaximumAutoCreatedQueueDepth(int value) -
setMaximumSystemApplications
public void setMaximumSystemApplications(int numMaxApps) -
getMaximumSystemApplications
public int getMaximumSystemApplications() -
setMaximumApplicationMasterResourcePercent
public void setMaximumApplicationMasterResourcePercent(float percent) -
getMaximumApplicationMasterResourcePercent
public float getMaximumApplicationMasterResourcePercent() -
getMaximumApplicationsPerQueue
Get the maximum applications per queue setting.- Parameters:
queue- path of the queue- Returns:
- setting specified or -1 if not set
-
setMaximumApplicationsPerQueue
-
getMaximumApplicationMasterResourcePerQueuePercent
Get the maximum am resource percent per queue setting.- Parameters:
queue- path of the queue- Returns:
- per queue setting or defaults to the global am-resource-percent setting if per queue setting not present
-
setMaximumApplicationMasterResourcePerQueuePercent
-
getNonLabeledQueueWeight
-
setNonLabeledQueueWeight
-
setLabeledQueueWeight
-
getLabeledQueueWeight
-
getNonLabeledQueueCapacity
-
setCapacity
-
setCapacity
-
getNonLabeledQueueMaximumCapacity
-
setMaximumCapacity
-
setCapacityByLabel
-
setCapacityByLabel
-
setMaximumCapacityByLabel
-
setMaximumCapacityByLabel
-
getUserLimit
-
getAppOrderingPolicy
-
setUserLimit
-
setDefaultUserLimit
@VisibleForTesting public void setDefaultUserLimit(float defaultUserLimit) -
getUserLimitFactor
-
setUserLimitFactor
-
setDefaultUserLimitFactor
@VisibleForTesting public void setDefaultUserLimitFactor(float defaultUserLimitFactor) -
getConfiguredState
-
getState
-
setState
@Private @VisibleForTesting public void setState(QueuePath queue, org.apache.hadoop.yarn.api.records.QueueState state) -
setAccessibleNodeLabels
-
getAccessibleNodeLabels
-
setCapacityVector
-
setMaximumCapacityVector
-
getLabeledQueueCapacity
-
getLabeledQueueMaximumCapacity
-
getDefaultNodeLabelExpression
-
setDefaultNodeLabelExpression
-
getMaximumAMResourcePercentPerPartition
-
setMaximumAMResourcePercentPerPartition
-
getReservationContinueLook
public boolean getReservationContinueLook() -
getSkipAllocateOnNodesWithReservedContainer
public boolean getSkipAllocateOnNodesWithReservedContainer() -
getAcl
public org.apache.hadoop.security.authorize.AccessControlList getAcl(QueuePath queue, org.apache.hadoop.yarn.api.records.QueueACL acl) -
setAcl
-
getACLsForLegacyAutoCreatedLeafQueue
public Map<org.apache.hadoop.yarn.security.AccessType,org.apache.hadoop.security.authorize.AccessControlList> getACLsForLegacyAutoCreatedLeafQueue(QueuePath parentQueuePath) Creates a mapping of queue ACLs for a Legacy Auto Created Leaf Queue.- Parameters:
parentQueuePath- the parent's queue path- Returns:
- A mapping of the queue ACLs.
-
getACLsForFlexibleAutoCreatedParentQueue
public static Map<org.apache.hadoop.yarn.security.AccessType,org.apache.hadoop.security.authorize.AccessControlList> getACLsForFlexibleAutoCreatedParentQueue(AutoCreatedQueueTemplate aqc) Creates a mapping of queue ACLs for a Flexible Auto Created Parent Queue. The .parent-template is preferred to .template ACLs.- Parameters:
aqc- The AQC templates to use.- Returns:
- A mapping of the queue ACLs.
-
getACLsForFlexibleAutoCreatedLeafQueue
public static Map<org.apache.hadoop.yarn.security.AccessType,org.apache.hadoop.security.authorize.AccessControlList> getACLsForFlexibleAutoCreatedLeafQueue(AutoCreatedQueueTemplate aqc) Creates a mapping of queue ACLs for a Flexible Auto Created Leaf Queue. The .leaf-template is preferred to .template ACLs.- Parameters:
aqc- The AQC templates to use.- Returns:
- A mapping of the queue ACLs.
-
getReservationAcls
public Map<org.apache.hadoop.yarn.api.records.ReservationACL,org.apache.hadoop.security.authorize.AccessControlList> getReservationAcls(QueuePath queue) Description copied from class:ReservationSchedulerConfigurationGets a map containing theAccessControlListof users for eachReservationACLacl on thee specified queue.- Specified by:
getReservationAclsin classReservationSchedulerConfiguration- Parameters:
queue- the queue with which to check a user's permissions.- Returns:
- The a Map of
ReservationACLtoAccessControlListwhich contains a list of users that have the specified permission level.
-
getAcls
-
setAcls
-
setReservationAcls
-
setPriorityAcls
-
getPriorityAcls
public List<AppPriorityACLGroup> getPriorityAcls(QueuePath queue, org.apache.hadoop.yarn.api.records.Priority clusterMaxPriority) -
getQueues
-
setQueues
-
getMinimumAllocation
public org.apache.hadoop.yarn.api.records.Resource getMinimumAllocation() -
getQueuePriority
-
setQueuePriority
-
getQueueMaximumAllocation
Get maximum_allocation setting for the specified queue from the configuration.- Parameters:
queue- name of the queue- Returns:
- Resource object or Resource.none if not set
-
setQueueMaximumAllocation
-
getConfigurationProperties
Get all configuration properties parsed in aConfigurationPropertiesobject.- Returns:
- configuration properties
-
reinitializeConfigurationProperties
public void reinitializeConfigurationProperties()Reinitializes the cachedConfigurationPropertiesobject. -
setQueueMaximumAllocationMb
-
setQueueMaximumAllocationVcores
-
getQueueMaximumAllocationMb
-
getQueueMaximumAllocationVcores
-
getEnableUserMetrics
public boolean getEnableUserMetrics() -
getOffSwitchPerHeartbeatLimit
public int getOffSwitchPerHeartbeatLimit() -
setOffSwitchPerHeartbeatLimit
public void setOffSwitchPerHeartbeatLimit(int limit) -
getNodeLocalityDelay
public int getNodeLocalityDelay() -
setNodeLocalityDelay
@VisibleForTesting public void setNodeLocalityDelay(int nodeLocalityDelay) -
getRackLocalityAdditionalDelay
public int getRackLocalityAdditionalDelay() -
getRackLocalityFullReset
public boolean getRackLocalityFullReset() -
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) -
getScheduleAynschronously
public boolean getScheduleAynschronously() -
setScheduleAynschronously
public void setScheduleAynschronously(boolean async) -
getOverrideWithQueueMappings
public boolean getOverrideWithQueueMappings() -
setOverrideWithQueueMappings
@Private @VisibleForTesting public void setOverrideWithQueueMappings(boolean overrideWithQueueMappings) -
getQueueMappingEntity
-
setQueueMappingEntities
@VisibleForTesting public void setQueueMappingEntities(List<QueueMapping> queueMappings, String queueMappingSuffix) -
getOverrideWithWorkflowPriorityMappings
public boolean getOverrideWithWorkflowPriorityMappings() -
getWorkflowPriorityMappings
-
getQueueMappings
Get user/group mappings to queues.- Returns:
- user/groups mappings or null on illegal configs
-
parseLegacyMappingRules
-
parseJSONMappingRules
- Throws:
IOException
-
setMappingRuleFormat
-
setMappingRuleJson
-
getMappingRules
- Throws:
IOException
-
setQueuePlacementRules
@Private @VisibleForTesting public void setQueuePlacementRules(Collection<String> queuePlacementRules) -
setQueueMappings
-
setAppNameMappings
-
isReservable
Description copied from class:ReservationSchedulerConfigurationChecks if the queue participates in reservation based scheduling- Specified by:
isReservablein classReservationSchedulerConfiguration- Parameters:
queue- name of the queue- Returns:
- true if the queue participates in reservation based scheduling
-
setReservable
-
getReservationWindow
Description copied from class:ReservationSchedulerConfigurationGets the length of time in milliseconds for which theSharingPolicychecks for validity- Overrides:
getReservationWindowin classReservationSchedulerConfiguration- Parameters:
queue- name of the queue- Returns:
- length in time in milliseconds for which to check the
SharingPolicy
-
getAverageCapacity
Description copied from class:ReservationSchedulerConfigurationGets the average allowed capacity which will aggregated over theReservationSchedulerConfiguration.getReservationWindow(org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.QueuePath)by the theSharingPolicyto check aggregate used capacity- Overrides:
getAverageCapacityin classReservationSchedulerConfiguration- Parameters:
queue- name of the queue- Returns:
- average capacity allowed by the
SharingPolicy
-
getInstantaneousMaxCapacity
Description copied from class:ReservationSchedulerConfigurationGets the maximum capacity at any time that theSharingPolicyallows- Overrides:
getInstantaneousMaxCapacityin classReservationSchedulerConfiguration- Parameters:
queue- name of the queue- Returns:
- maximum allowed capacity at any time
-
setInstantaneousMaxCapacity
-
setReservationWindow
-
setAverageCapacity
-
getReservationAdmissionPolicy
Description copied from class:ReservationSchedulerConfigurationGets the name of theSharingPolicyclass associated with the queue- Overrides:
getReservationAdmissionPolicyin classReservationSchedulerConfiguration- Parameters:
queue- name of the queue- Returns:
- the class name of the
SharingPolicy
-
setReservationAdmissionPolicy
-
getReservationAgent
Description copied from class:ReservationSchedulerConfigurationGets the name of theReservationAgentclass associated with the queue- Overrides:
getReservationAgentin classReservationSchedulerConfiguration- Parameters:
queue- name of the queue- Returns:
- the class name of the
ReservationAgent
-
setReservationAgent
-
getShowReservationAsQueues
Description copied from class:ReservationSchedulerConfigurationChecks whether the reservation queues be hidden or visible- Overrides:
getShowReservationAsQueuesin classReservationSchedulerConfiguration- Parameters:
queuePath- name of the queue- Returns:
- true if reservation queues should be visible
-
getReplanner
Description copied from class:ReservationSchedulerConfigurationGets the name of thePlannerclass associated with the queue- Overrides:
getReplannerin classReservationSchedulerConfiguration- Parameters:
queue- name of the queue- Returns:
- the class name of the
Planner
-
getMoveOnExpiry
Description copied from class:ReservationSchedulerConfigurationGets whether the applications should be killed or moved to the parent queue when theReservationDefinitionexpires- Overrides:
getMoveOnExpiryin classReservationSchedulerConfiguration- Parameters:
queue- name of the queue- Returns:
- true if application should be moved, false if they need to be killed
-
getEnforcementWindow
Description copied from class:ReservationSchedulerConfigurationGets the time in milliseconds for which thePlannerwill verify thePlans satisfy the constraints- Overrides:
getEnforcementWindowin classReservationSchedulerConfiguration- Parameters:
queue- name of the queue- Returns:
- the time in milliseconds for which to check constraints
-
setPreemptionDisabled
Sets the disable_preemption property in order to indicate whether or not container preemption will be disabled for the specified queue.- Parameters:
queue- queue pathpreemptionDisabled- true if preemption is disabled on queue
-
getPreemptionDisabled
Indicates whether preemption is disabled on the specified queue.- Parameters:
queue- queue path to querydefaultVal- used as default if the disable_preemption is not set in the configuration- Returns:
- true if preemption is disabled on queue, false otherwise
-
getIntraQueuePreemptionDisabled
Indicates whether intra-queue preemption is disabled on the specified queue- Parameters:
queue- queue path to querydefaultVal- used as default if the property is not set in the configuration- Returns:
- true if preemption is disabled on queue, false otherwise
-
setPreemptionObserveOnly
public void setPreemptionObserveOnly(boolean value) -
getPreemptionObserveOnly
public boolean getPreemptionObserveOnly() -
getConfiguredNodeLabels
Get configured node labels in a given queuePath.- Parameters:
queuePath- queue path.- Returns:
- configured node labels.
-
getConfiguredNodeLabelsByQueue
Get configured node labels for all queues that have accessible-node-labels prefixed properties set.- Returns:
- configured node labels
-
getClusterLevelApplicationMaxPriority
public org.apache.hadoop.yarn.api.records.Priority getClusterLevelApplicationMaxPriority() -
getDefaultApplicationPriorityConfPerQueue
-
setOrderingPolicy
-
setOrderingPolicyParameter
-
getLazyPreemptionEnabled
public boolean getLazyPreemptionEnabled() -
shouldAppFailFast
public static boolean shouldAppFailFast(org.apache.hadoop.conf.Configuration conf) -
setDefaultMaxParallelApps
public void setDefaultMaxParallelApps(int value) -
getDefaultMaxParallelApps
-
setDefaultMaxParallelAppsPerUser
public void setDefaultMaxParallelAppsPerUser(int value) -
getDefaultMaxParallelAppsPerUser
-
setMaxParallelAppsForUser
-
getMaxParallelAppsForUser
-
setMaxParallelAppsForQueue
-
getMaxParallelAppsForQueue
-
getAllowZeroCapacitySum
-
setAllowZeroCapacitySum
-
getGlobalMaximumApplicationsPerQueue
public int getGlobalMaximumApplicationsPerQueue() -
setGlobalMaximumApplicationsPerQueue
public void setGlobalMaximumApplicationsPerQueue(int val) -
setQueueOrderingPolicy
-
getQueueOrderingPolicy
-
getPUOrderingPolicyUnderUtilizedPreemptionEnabled
public boolean getPUOrderingPolicyUnderUtilizedPreemptionEnabled()Do we allow under-utilized queue with higher priority to preempt queue with lower priority *even if queue with lower priority is not satisfied*. For example, two queues, a and b a.priority = 1, (a.used-capacity - a.reserved-capacity) = 40% b.priority = 0, b.used-capacity = 30% Set this configuration to true to allow queue-a to preempt container from queue-b. (The reason why deduct reserved-capacity from used-capacity for queue with higher priority is: the reserved-capacity is just scheduler's internal implementation to allocate large containers, it is not possible for application to use such reserved-capacity. It is possible that a queue with large container requests have a large number of containers but cannot allocate from any of them. But scheduler will make sure a satisfied queue will not preempt resource from any other queues. A queue is considered to be satisfied when queue's used-capacity - reserved-capacity ≥ guaranteed-capacity.)- Returns:
- allowed or not
-
setPUOrderingPolicyUnderUtilizedPreemptionEnabled
@VisibleForTesting public void setPUOrderingPolicyUnderUtilizedPreemptionEnabled(boolean enabled) -
getPUOrderingPolicyUnderUtilizedPreemptionDelay
public long getPUOrderingPolicyUnderUtilizedPreemptionDelay()When a reserved container of an underutilized queue is created. Preemption will kick in after specified delay (in ms). The total time to preempt resources for a reserved container from higher priority queue will be: reserved-container-delay-ms +PREEMPTION_WAIT_TIME_BEFORE_KILL. This parameter is added to make preemption from lower priority queue which is underutilized to be more careful. This parameter takes effect when underutilized-preemption.enabled set to true.- Returns:
- delay
-
setPUOrderingPolicyUnderUtilizedPreemptionDelay
@VisibleForTesting public void setPUOrderingPolicyUnderUtilizedPreemptionDelay(long timeout) -
getPUOrderingPolicyUnderUtilizedPreemptionMoveReservation
public boolean getPUOrderingPolicyUnderUtilizedPreemptionMoveReservation()When doing preemption from under-satisfied queues for priority queue. Do we allow move reserved container from one host to another?- Returns:
- allow or not
-
setPUOrderingPolicyUnderUtilizedPreemptionMoveReservation
@VisibleForTesting public void setPUOrderingPolicyUnderUtilizedPreemptionMoveReservation(boolean allowMoveReservation) -
getAllUserWeightsForQueue
Get the weights of all users at this queue level from the configuration. Used in computing user-specific user limit, relative to other users.- Parameters:
queuePath- full queue path- Returns:
- map of user weights, if they exist. Otherwise, return empty map.
-
getAssignMultipleEnabled
public boolean getAssignMultipleEnabled() -
getMaxAssignPerHeartbeat
public int getMaxAssignPerHeartbeat() -
getMaximumLifetimePerQueue
-
setMaximumLifetimePerQueue
-
getDefaultLifetimePerQueue
-
setDefaultLifetimePerQueue
-
isAutoCreateChildQueueEnabled
If true, this queue will be created as a Parent Queue which Auto Created leaf child queues- Parameters:
queuePath- The queues path- Returns:
- true if auto create is enabled for child queues else false. Default is false
-
setAutoCreateChildQueueEnabled
@Private @VisibleForTesting public void setAutoCreateChildQueueEnabled(QueuePath queuePath, boolean autoCreationEnabled) -
setAutoQueueCreationV2Enabled
-
isAutoQueueCreationV2Enabled
-
getShouldFailAutoQueueCreationWhenGuaranteedCapacityExceeded
@Private public boolean getShouldFailAutoQueueCreationWhenGuaranteedCapacityExceeded(QueuePath queuePath) Fail further auto leaf queue creation when parent's guaranteed capacity is exceeded.- Parameters:
queuePath- the parent queue's path- Returns:
- true if configured to fail else false
-
setShouldFailAutoQueueCreationWhenGuaranteedCapacityExceeded
@VisibleForTesting @Private public void setShouldFailAutoQueueCreationWhenGuaranteedCapacityExceeded(QueuePath queuePath, boolean autoCreationEnabled) -
getAutoCreatedQueuesMaxChildQueuesLimit
Get the max number of leaf queues that are allowed to be created under a parent queue- Parameters:
queuePath- the paret queue's path- Returns:
- the max number of leaf queues allowed to be auto created
-
getAutoCreatedQueuesV2MaxChildQueuesLimit
Get the max number of queues that are allowed to be created under a parent queue which allowed auto creation v2.- Parameters:
queuePath- the parent queue's path- Returns:
- the max number of queues allowed to be auto created, in new auto created.
-
setAutoCreatedQueuesV2MaxChildQueuesLimit
@VisibleForTesting public void setAutoCreatedQueuesV2MaxChildQueuesLimit(QueuePath queuePath, int maxQueues) -
isAutoExpiredDeletionEnabled
If true, auto created queue with weight mode will be deleted when queue is expired.- Parameters:
queuePath- the queue's path for auto deletion check- Returns:
- true if auto created queue's deletion when expired is enabled else false. Default is true.
-
setAutoExpiredDeletionEnabled
@Private @VisibleForTesting public void setAutoExpiredDeletionEnabled(QueuePath queuePath, boolean autoRemovalEnable) -
setAutoExpiredDeletionTime
@Private @VisibleForTesting public void setAutoExpiredDeletionTime(long time) -
getAutoExpiredDeletionTime
@Private @VisibleForTesting public long getAutoExpiredDeletionTime() -
getAutoCreatedQueueManagementPolicy
Queue Management computation policy for Auto Created queues- Parameters:
queue- The queue's path- Returns:
- Configured policy class name
-
getAutoCreatedQueueManagementPolicyClass
@Private protected AutoCreatedQueueManagementPolicy getAutoCreatedQueueManagementPolicyClass(QueuePath queue) Get The policy class configured to manage capacities for auto created leaf queues under the specified parent- Parameters:
queue- The parent queue's path- Returns:
- The policy class configured to manage capacities for auto created leaf queues under the specified parent queue
-
setAutoCreatedLeafQueueConfigCapacity
@VisibleForTesting @Private public void setAutoCreatedLeafQueueConfigCapacity(QueuePath queuePath, float val) -
setAutoCreatedLeafQueueTemplateCapacityByLabel
-
setAutoCreatedLeafQueueTemplateCapacityByLabel
-
setAutoCreatedLeafQueueConfigMaxCapacity
@Private @VisibleForTesting public void setAutoCreatedLeafQueueConfigMaxCapacity(QueuePath queuePath, float val) -
setAutoCreatedLeafQueueTemplateMaxCapacity
-
setAutoCreatedLeafQueueTemplateMaxCapacity
-
setAutoCreatedLeafQueueConfigUserLimit
@VisibleForTesting @Private public void setAutoCreatedLeafQueueConfigUserLimit(QueuePath queuePath, int val) -
setAutoCreatedLeafQueueConfigUserLimitFactor
@VisibleForTesting @Private public void setAutoCreatedLeafQueueConfigUserLimitFactor(QueuePath queuePath, float val) -
setAutoCreatedLeafQueueConfigDefaultNodeLabelExpression
-
setAutoCreatedLeafQueueConfigMaximumAllocation
-
getUnits
-
getMinimumResourceRequirement
public org.apache.hadoop.yarn.api.records.Resource getMinimumResourceRequirement(String label, QueuePath queue, Set<String> resourceTypes) Get absolute minimum resource requirement for a queue.- Parameters:
label- NodeLabelqueue- queue pathresourceTypes- Resource types- Returns:
- ResourceInformation
-
getMaximumResourceRequirement
public org.apache.hadoop.yarn.api.records.Resource getMaximumResourceRequirement(String label, QueuePath queue, Set<String> resourceTypes) Get absolute maximum resource requirement for a queue.- Parameters:
label- NodeLabelqueue- queue pathresourceTypes- Resource types- Returns:
- Resource
-
setMinimumResourceRequirement
-
setMaximumResourceRequirement
-
parseConfiguredResourceVector
-
parseConfiguredMaximumCapacityVector
public Map<String,QueueCapacityVector> parseConfiguredMaximumCapacityVector(QueuePath queuePath, Set<String> labels, QueueCapacityVector defaultVector) -
checkConfigTypeIsAbsoluteResource
-
getMultiNodesSortingAlgorithmPolicy
-
isLegacyQueueMode
public boolean isLegacyQueueMode() -
setLegacyQueueModeEnabled
public void setLegacyQueueModeEnabled(boolean value) -
getMultiNodePlacementEnabled
public boolean getMultiNodePlacementEnabled() -
getMultiNodePlacementPolicies
-