diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/CapacityScheduler.md b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/CapacityScheduler.md index 86d9167e5f5..c9cfefd4f18 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/CapacityScheduler.md +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/markdown/CapacityScheduler.md @@ -274,6 +274,58 @@ The `ReservationSystem` is integrated with the `CapacityScheduler` queue hierach | `yarn.scheduler.capacity..reservation-planner` | *Optional* parameter: the class name that will be used to determine the implementation of the *Planner* which will be invoked if the `Plan` capacity fall below (due to scheduled maintenance or node failuers) the user reserved resources. The default value is *org.apache.hadoop.yarn.server.resourcemanager.reservation.planning.SimpleCapacityReplanner* which scans the `Plan` and greedily removes reservations in reversed order of acceptance (LIFO) till the reserved resources are within the `Plan` capacity | | `yarn.scheduler.capacity..reservation-enforcement-window` | *Optional* parameter representing the time in milliseconds for which the `Planner` will validate if the constraints in the Plan are satisfied. Long value expected. The default value is one hour. | +###Dynamic Auto Creation and Management of Leaf Queues + +The `CapacityScheduler` supports auto-creation of **leaf queues** under parent queues which have been configured to enable this feature. This works in conjunction with queue-mapping which currently supports **user-group** based queue mappings for application placement to a queue. The scheduler also supports +capacity management for these queues based on a policy configured on the parent queue. Users or groups might submit applications to the auto-created leaf queues for a limited time and stop using them. Hence there could be more number of leaf queues auto-created under the parent queue than its guaranteed capacity. +The current policy implementation allots either configured or zero capacity on a **best-effort** basis based on availability of capacity on the parent queue and the application submission order across leaf queues. + +###Setup for auto-created leaf queues through queue mapping + + * Queue Mapping based on User or Group + + Queue Mappings need to specify a parent queue to identify which parent + queue the auto-created leaf queue need to be created under + +| Property | Description | +|:---- |:---- | +| `yarn.scheduler.capacity.queue-mappings` | Specify parent queue name for each leaf queue which needs to be auto-created.| + +Example: + +``` + + yarn.scheduler.capacity.queue-mappings + u:user1:queue1,g:group1:queue2,u:user2:%primary_group,u:%user:parent1.%user + + Here, any is mapped to its own user specific leaf queue which + will be auto-created under + + +``` + * Scheduling Edit Policy configuration for auto-created queue management + +| Property | Description | +|:---- |:---- | +| `yarn.resourcemanager.scheduler.monitor.policies` | *Mandatory* parameter: to enable capacity management scheduling updates for `Auto Created Leaf Queues`in the **CapacityScheduler**. Class name of the policy implementation is expected to be `org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.QueueManagementDynamicEditPolicy` and should be appended to the list of current scheduling edit policies as a comma separated string. The default value is `org.apache.hadoop.yarn.server.resourcemanager.monitor.capacity.ProportionalCapacityPreemptionPolicy`. | +| `yarn.resourcemanager.monitor.capacity.queue-management.monitoring_interval` | Time in milliseconds between invocations of this QueueManagementDynamicEditPolicy policy. Default value is 1500 | + +The `Auto Queue Creation and Management` is integrated with the `CapacityScheduler` queue hierarchy and can be configured for a **ParentQueue** currently to auto create leaf queues. Such parent queues do not support other pre-configured queues to co-exist along with auto-created queues. The `CapacityScheduler` supports the following parameters to enable auto-creation of queues + +| Property | Description | +|:---- |:---- | +| `yarn.scheduler.capacity..auto-create-child-queue.enabled` | *Mandatory* parameter: indicates to the `CapacityScheduler` that auto leaf queue creation needs to be enabled for the specified parent queue. Boolean value expected. The default value is *false*, i.e. auto leaf queue creation is not enabled in *ParentQueues* by default. | +| `yarn.scheduler.capacity..auto-create-child-queue.management-policy` | *Optional* parameter: the class name that will be used to determine the implementation of the `AutoCreatedQueueManagementPolicy` which will manage leaf queues and their capacities dynamically under this parent queue. The default value is *org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.queuemanagement.GuaranteedOrZeroCapacityOverTimePolicy*. | + +### Configuring `Auto Created Leaf Queues` with `CapacityScheduler` + +The parent queue which has been enabled for auto leaf queue creation, supports the configuration of template parameters for automatic configuration of the auto-created leaf queues. The Auto Created queues support all of the leaf queue configuration parameters except for **Submit ACL** and **Admin ACL**, **Absolute Resource** Configurations. Submit and Admin ACLs are currently inherited from the parent queue. + +| Property | Description | +|:---- |:---- | +| `yarn.scheduler.capacity..leaf-queue-template.capacity` | *Mandatory* parameter: specifies the minimum guaranteed capacity for the auto created leaf queues. Currently *Absolute Resource* configurations are not supported on auto-created leaf queues | +| `yarn.scheduler.capacity..leaf-queue-template.` | *Optional* parameter: For other queue parameters that can be configured on auto-created queues like maximum-capacity, user-limit-factor, maximum-am-resource-percent ... - Refer **Queue Properties** section | + ###Other Properties * Resource Calculator