Page MenuHomec4science

FairScheduler.html
No OneTemporary

File Metadata

Created
Tue, Feb 25, 19:06

FairScheduler.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- Generated by Apache Maven Doxia at 2014-02-11 -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Apache Hadoop 2.3.0 - Hadoop Map Reduce Next Generation-2.3.0 - Fair Scheduler</title>
<style type="text/css" media="all">
@import url("./css/maven-base.css");
@import url("./css/maven-theme.css");
@import url("./css/site.css");
</style>
<link rel="stylesheet" href="./css/print.css" type="text/css" media="print" />
<meta name="Date-Revision-yyyymmdd" content="20140211" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body class="composite">
<div id="banner">
<a href="http://hadoop.apache.org/" id="bannerLeft">
<img src="http://hadoop.apache.org/images/hadoop-logo.jpg" alt="" />
</a>
<a href="http://www.apache.org/" id="bannerRight">
<img src="http://www.apache.org/images/asf_logo_wide.png" alt="" />
</a>
<div class="clear">
<hr/>
</div>
</div>
<div id="breadcrumbs">
<div class="xleft">
<a href="http://www.apache.org/" class="externalLink">Apache</a>
&gt;
<a href="http://hadoop.apache.org/" class="externalLink">Hadoop</a>
&gt;
<a href="../">hadoop-yarn</a>
&gt;
Apache Hadoop 2.3.0
</div>
<div class="xright"> <a href="http://wiki.apache.org/hadoop" class="externalLink">Wiki</a>
|
<a href="https://svn.apache.org/repos/asf/hadoop/" class="externalLink">SVN</a>
|
<a href="http://hadoop.apache.org/" class="externalLink">Apache Hadoop</a>
&nbsp;| Last Published: 2014-02-11
&nbsp;| Version: 2.3.0
</div>
<div class="clear">
<hr/>
</div>
</div>
<div id="leftColumn">
<div id="navcolumn">
<h5>General</h5>
<ul>
<li class="none">
<a href="../../index.html">Overview</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/SingleCluster.html">Single Node Setup</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/ClusterSetup.html">Cluster Setup</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/CommandsManual.html">Hadoop Commands Reference</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/FileSystemShell.html">File System Shell</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/Compatibility.html">Hadoop Compatibility</a>
</li>
</ul>
<h5>Common</h5>
<ul>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/CLIMiniCluster.html">CLI Mini Cluster</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/NativeLibraries.html">Native Libraries</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/Superusers.html">Superusers</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/SecureMode.html">Secure Mode</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/ServiceLevelAuth.html">Service Level Authorization</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/HttpAuthentication.html">HTTP Authentication</a>
</li>
</ul>
<h5>HDFS</h5>
<ul>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsUserGuide.html">HDFS User Guide</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/HDFSHighAvailabilityWithQJM.html">High Availability With QJM</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/HDFSHighAvailabilityWithNFS.html">High Availability With NFS</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/Federation.html">Federation</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsSnapshots.html">HDFS Snapshots</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsDesign.html">HDFS Architecture</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsEditsViewer.html">Edits Viewer</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsImageViewer.html">Image Viewer</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsPermissionsGuide.html">Permissions and HDFS</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsQuotaAdminGuide.html">Quotas and HDFS</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/Hftp.html">HFTP</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/LibHdfs.html">C API libhdfs</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/WebHDFS.html">WebHDFS REST API</a>
</li>
<li class="none">
<a href="../../hadoop-hdfs-httpfs/index.html">HttpFS Gateway</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/ShortCircuitLocalReads.html">Short Circuit Local Reads</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/CentralizedCacheManagement.html">Centralized Cache Management</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/HdfsNfsGateway.html">HDFS NFS Gateway</a>
</li>
</ul>
<h5>MapReduce</h5>
<ul>
<li class="none">
<a href="../../hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduce_Compatibility_Hadoop1_Hadoop2.html">Compatibilty between Hadoop 1.x and Hadoop 2.x</a>
</li>
<li class="none">
<a href="../../hadoop-mapreduce-client/hadoop-mapreduce-client-core/EncryptedShuffle.html">Encrypted Shuffle</a>
</li>
<li class="none">
<a href="../../hadoop-mapreduce-client/hadoop-mapreduce-client-core/PluggableShuffleAndPluggableSort.html">Pluggable Shuffle/Sort</a>
</li>
<li class="none">
<a href="../../hadoop-mapreduce-client/hadoop-mapreduce-client-core/DistributedCacheDeploy.html">Distributed Cache Deploy</a>
</li>
</ul>
<h5>YARN</h5>
<ul>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/YARN.html">YARN Architecture</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/WritingYarnApplications.html">Writing YARN Applications</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/CapacityScheduler.html">Capacity Scheduler</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/FairScheduler.html">Fair Scheduler</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/WebApplicationProxy.html">Web Application Proxy</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/YarnCommands.html">YARN Commands</a>
</li>
<li class="none">
<a href="../../hadoop-sls/SchedulerLoadSimulator.html">Scheduler Load Simulator</a>
</li>
</ul>
<h5>YARN REST APIs</h5>
<ul>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/WebServicesIntro.html">Introduction</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/ResourceManagerRest.html">Resource Manager</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/NodeManagerRest.html">Node Manager</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/MapredAppMasterRest.html">MR Application Master</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-site/HistoryServerRest.html">History Server</a>
</li>
</ul>
<h5>Auth</h5>
<ul>
<li class="none">
<a href="../../hadoop-auth/index.html">Overview</a>
</li>
<li class="none">
<a href="../../hadoop-auth/Examples.html">Examples</a>
</li>
<li class="none">
<a href="../../hadoop-auth/Configuration.html">Configuration</a>
</li>
<li class="none">
<a href="../../hadoop-auth/BuildingIt.html">Building</a>
</li>
</ul>
<h5>Reference</h5>
<ul>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/releasenotes.html">Release Notes</a>
</li>
<li class="none">
<a href="../../api/index.html">API docs</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/CHANGES.txt">Common CHANGES.txt</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/CHANGES.txt">HDFS CHANGES.txt</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-mapreduce/CHANGES.txt">MapReduce CHANGES.txt</a>
</li>
</ul>
<h5>Configuration</h5>
<ul>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/core-default.xml">core-default.xml</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-hdfs/hdfs-default.xml">hdfs-default.xml</a>
</li>
<li class="none">
<a href="../../hadoop-mapreduce-client/hadoop-mapreduce-client-core/mapred-default.xml">mapred-default.xml</a>
</li>
<li class="none">
<a href="../../hadoop-yarn/hadoop-yarn-common/yarn-default.xml">yarn-default.xml</a>
</li>
<li class="none">
<a href="../../hadoop-project-dist/hadoop-common/DeprecatedProperties.html">Deprecated Properties</a>
</li>
</ul>
<a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
<img alt="Built by Maven" src="./images/logos/maven-feather.png"/>
</a>
</div>
</div>
<div id="bodyColumn">
<div id="contentBox">
<!-- Licensed under the Apache License, Version 2.0 (the "License"); --><!-- you may not use this file except in compliance with the License. --><!-- You may obtain a copy of the License at --><!-- --><!-- http://www.apache.org/licenses/LICENSE-2.0 --><!-- --><!-- Unless required by applicable law or agreed to in writing, software --><!-- distributed under the License is distributed on an "AS IS" BASIS, --><!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --><!-- See the License for the specific language governing permissions and --><!-- limitations under the License. See accompanying LICENSE file. --><div class="section">
<h2>Hadoop MapReduce Next Generation - Fair Scheduler<a name="Hadoop_MapReduce_Next_Generation_-_Fair_Scheduler"></a></h2>
<p>[ <a href="./index.html">Go Back</a> ]</p>
<ul>
<li><a href="#Hadoop_MapReduce_Next_Generation_-_Fair_Scheduler">Hadoop MapReduce Next Generation - Fair Scheduler</a>
<ul>
<li><a href="#Purpose">Purpose </a></li>
<li><a href="#Introduction">Introduction</a></li>
<li><a href="#Hierarchical_queues_with_pluggable_policies">Hierarchical queues with pluggable policies</a></li>
<li><a href="#Automatically_placing_applications_in_queues">Automatically placing applications in queues</a></li>
<li><a href="#Installation">Installation</a></li>
<li><a href="#Configuration">Configuration</a></li></ul></li></ul>
<div class="section">
<h3><a name="Purpose">Purpose</a> </h3>
<p>This document describes the <tt>FairScheduler</tt>, a pluggable scheduler for Hadoop that allows YARN applications to share resources in large clusters fairly.</p></div>
<div class="section">
<h3><a name="Introduction">Introduction</a></h3>
<p>Fair scheduling is a method of assigning resources to applications such that all apps get, on average, an equal share of resources over time. Hadoop NextGen is capable of scheduling multiple resource types. By default, the Fair Scheduler bases scheduling fairness decisions only on memory. It can be configured to schedule with both memory and CPU, using the notion of Dominant Resource Fairness developed by Ghodsi et al. When there is a single app running, that app uses the entire cluster. When other apps are submitted, resources that free up are assigned to the new apps, so that each app eventually on gets roughly the same amount of resources. Unlike the default Hadoop scheduler, which forms a queue of apps, this lets short apps finish in reasonable time while not starving long-lived apps. It is also a reasonable way to share a cluster between a number of users. Finally, fair sharing can also work with app priorities - the priorities are used as weights to determine the fraction of total resources that each app should get.</p>
<p>The scheduler organizes apps further into &quot;queues&quot;, and shares resources fairly between these queues. By default, all users share a single queue, named &#x201c;default&#x201d;. If an app specifically lists a queue in a container resource request, the request is submitted to that queue. It is also possible to assign queues based on the user name included with the request through configuration. Within each queue, a scheduling policy is used to share resources between the running apps. The default is memory-based fair sharing, but FIFO and multi-resource with Dominant Resource Fairness can also be configured. Queues can be arranged in a hierarchy to divide resources and configured with weights to share the cluster in specific proportions.</p>
<p>In addition to providing fair sharing, the Fair Scheduler allows assigning guaranteed minimum shares to queues, which is useful for ensuring that certain users, groups or production applications always get sufficient resources. When a queue contains apps, it gets at least its minimum share, but when the queue does not need its full guaranteed share, the excess is split between other running apps. This lets the scheduler guarantee capacity for queues while utilizing resources efficiently when these queues don't contain applications.</p>
<p>The Fair Scheduler lets all apps run by default, but it is also possible to limit the number of running apps per user and per queue through the config file. This can be useful when a user must submit hundreds of apps at once, or in general to improve performance if running too many apps at once would cause too much intermediate data to be created or too much context-switching. Limiting the apps does not cause any subsequently submitted apps to fail, only to wait in the scheduler's queue until some of the user's earlier apps finish. </p></div>
<div class="section">
<h3><a name="Hierarchical_queues_with_pluggable_policies">Hierarchical queues with pluggable policies</a></h3>
<p>The fair scheduler supports hierarchical queues. All queues descend from a queue named &quot;root&quot;. Available resources are distributed among the children of the root queue in the typical fair scheduling fashion. Then, the children distribute the resources assigned to them to their children in the same fashion. Applications may only be scheduled on leaf queues. Queues can be specified as children of other queues by placing them as sub-elements of their parents in the fair scheduler allocation file.</p>
<p>A queue's name starts with the names of its parents, with periods as separators. So a queue named &quot;queue1&quot; under the root queue, would be referred to as &quot;root.queue1&quot;, and a queue named &quot;queue2&quot; under a queue named &quot;parent1&quot; would be referred to as &quot;root.parent1.queue2&quot;. When referring to queues, the root part of the name is optional, so queue1 could be referred to as just &quot;queue1&quot;, and a queue2 could be referred to as just &quot;parent1.queue2&quot;.</p>
<p>Additionally, the fair scheduler allows setting a different custom policy for each queue to allow sharing the queue's resources in any which way the user wants. A custom policy can be built by extending <tt>org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.SchedulingPolicy</tt>. FifoPolicy, FairSharePolicy (default), and DominantResourceFairnessPolicy are built-in and can be readily used.</p>
<p>Certain add-ons are not yet supported which existed in the original (MR1) Fair Scheduler. Among them, is the use of a custom policies governing priority &#x201c;boosting&#x201d; over certain apps. </p></div>
<div class="section">
<h3><a name="Automatically_placing_applications_in_queues">Automatically placing applications in queues</a></h3>
<p>The Fair Scheduler allows administrators to configure policies that automatically place submitted applications into appropriate queues. Placement can depend on the user and groups of the submitter and the requested queue passed by the application. A policy consists of a set of rules that are applied sequentially to classify an incoming application. Each rule either places the app into a queue, rejects it, or continues on to the next rule. Refer to the allocation file format below for how to configure these policies.</p></div>
<div class="section">
<h3><a name="Installation">Installation</a></h3>
<p>To use the Fair Scheduler first assign the appropriate scheduler class in yarn-site.xml:</p>
<div>
<pre>&lt;property&gt;
&lt;name&gt;yarn.resourcemanager.scheduler.class&lt;/name&gt;
&lt;value&gt;org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler&lt;/value&gt;
&lt;/property&gt;</pre></div></div>
<div class="section">
<h3><a name="Configuration">Configuration</a></h3>
<p>Customizing the Fair Scheduler typically involves altering two files. First, scheduler-wide options can be set by adding configuration properties in the yarn-site.xml file in your existing configuration directory. Second, in most cases users will want to create an allocation file listing which queues exist and their respective weights and capacities. The allocation file is reloaded every 10 seconds, allowing changes to be made on the fly.</p></div></div>
<div class="section">
<h2>Properties that can be placed in yarn-site.xml<a name="Properties_that_can_be_placed_in_yarn-site.xml"></a></h2>
<ul>
<li><tt>yarn.scheduler.fair.allocation.file</tt>
<ul>
<li>Path to allocation file. An allocation file is an XML manifest describing queues and their properties, in addition to certain policy defaults. This file must be in the XML format described in the next section. If a relative path is given, the file is searched for on the classpath (which typically includes the Hadoop conf directory). Defaults to fair-scheduler.xml.</li></ul></li>
<li><tt>yarn.scheduler.fair.user-as-default-queue</tt>
<ul>
<li>Whether to use the username associated with the allocation as the default queue name, in the event that a queue name is not specified. If this is set to &quot;false&quot; or unset, all jobs have a shared default queue, named &quot;default&quot;. Defaults to true. If a queue placement policy is given in the allocations file, this property is ignored.</li></ul></li>
<li><tt>yarn.scheduler.fair.preemption</tt>
<ul>
<li>Whether to use preemption. Note that preemption is experimental in the current version. Defaults to false.</li></ul></li>
<li><tt>yarn.scheduler.fair.sizebasedweight</tt>
<ul>
<li>Whether to assign shares to individual apps based on their size, rather than providing an equal share to all apps regardless of size. When set to true, apps are weighted by the natural logarithm of one plus the app's total requested memory, divided by the natural logarithm of 2. Defaults to false.</li></ul></li>
<li><tt>yarn.scheduler.fair.assignmultiple</tt>
<ul>
<li>Whether to allow multiple container assignments in one heartbeat. Defaults to false.</li></ul></li>
<li><tt>yarn.scheduler.fair.max.assign</tt>
<ul>
<li>If assignmultiple is true, the maximum amount of containers that can be assigned in one heartbeat. Defaults to -1, which sets no limit.</li></ul></li>
<li><tt>yarn.scheduler.fair.locality.threshold.node</tt>
<ul>
<li>For applications that request containers on particular nodes, the number of scheduling opportunities since the last container assignment to wait before accepting a placement on another node. Expressed as a float between 0 and 1, which, as a fraction of the cluster size, is the number of scheduling opportunities to pass up. The default value of -1.0 means don't pass up any scheduling opportunities.</li></ul></li>
<li><tt>yarn.scheduler.fair.locality.threshold.rack</tt>
<ul>
<li>For applications that request containers on particular racks, the number of scheduling opportunities since the last container assignment to wait before accepting a placement on another rack. Expressed as a float between 0 and 1, which, as a fraction of the cluster size, is the number of scheduling opportunities to pass up. The default value of -1.0 means don't pass up any scheduling opportunities.</li></ul></li>
<li><tt>yarn.scheduler.fair.allow-undeclared-pools</tt>
<ul>
<li>If this is true, new queues can be created at application submission time, whether because they are specified as the application's queue by the submitter or because they are placed there by the user-as-default-queue property. If this is false, any time an app would be placed in a queue that is not specified in the allocations file, it is placed in the &quot;default&quot; queue instead. Defaults to true. If a queue placement policy is given in the allocations file, this property is ignored.</li></ul></li></ul></div>
<div class="section">
<h2>Allocation file format<a name="Allocation_file_format"></a></h2>
<p>The allocation file must be in XML format. The format contains five types of elements:</p>
<ul>
<li><b>Queue elements</b>, which represent queues. Each may contain the following properties:
<ul>
<li>minResources: minimum resources the queue is entitled to, in the form &quot;X mb, Y vcores&quot;. For the single-resource fairness policy, the vcores value is ignored. If a queue's minimum share is not satisfied, it will be offered available resources before any other queue under the same parent. Under the single-resource fairness policy, a queue is considered unsatisfied if its memory usage is below its minimum memory share. Under dominant resource fairness, a queue is considered unsatisfied if its usage for its dominant resource with respect to the cluster capacity is below its minimum share for that resource. If multiple queues are unsatisfied in this situation, resources go to the queue with the smallest ratio between relevant resource usage and minimum. Note that it is possible that a queue that is below its minimum may not immediately get up to its minimum when it submits an application, because already-running jobs may be using those resources.</li>
<li>maxResources: maximum resources a queue is allowed, in the form &quot;X mb, Y vcores&quot;. For the single-resource fairness policy, the vcores value is ignored. A queue will never be assigned a container that would put its aggregate usage over this limit.</li>
<li>maxRunningApps: limit the number of apps from the queue to run at once</li>
<li>weight: to share the cluster non-proportionally with other queues. Weights default to 1, and a queue with weight 2 should receive approximately twice as many resources as a queue with the default weight.</li>
<li>schedulingPolicy: to set the scheduling policy of any queue. The allowed values are &quot;fifo&quot;/&quot;fair&quot;/&quot;drf&quot; or any class that extends <tt>org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.SchedulingPolicy</tt>. Defaults to &quot;fair&quot;. If &quot;fifo&quot;, apps with earlier submit times are given preference for containers, but apps submitted later may run concurrently if there is leftover space on the cluster after satisfying the earlier app's requests.</li>
<li>aclSubmitApps: a list of users and/or groups that can submit apps to the queue. Refer to the ACLs section below for more info on the format of this list and how queue ACLs work.</li>
<li>aclAdministerApps: a list of users and/or groups that can administer a queue. Currently the only administrative action is killing an application. Refer to the ACLs section below for more info on the format of this list and how queue ACLs work.</li>
<li>minSharePreemptionTimeout: number of seconds the queue is under its minimum share before it will try to preempt containers to take resources from other queues.</li></ul></li>
<li><b>User elements</b>, which represent settings governing the behavior of individual users. They can contain a single property: maxRunningApps, a limit on the number of running apps for a particular user.</li>
<li><b>A userMaxAppsDefault element</b>, which sets the default running app limit for any users whose limit is not otherwise specified.</li>
<li><b>A fairSharePreemptionTimeout element</b>, number of seconds a queue is under its fair share before it will try to preempt containers to take resources from other queues.</li>
<li><b>A defaultQueueSchedulingPolicy element</b>, which sets the default scheduling policy for queues; overriden by the schedulingPolicy element in each queue if specified. Defaults to &quot;fair&quot;.</li>
<li><b>A queuePlacementPolicy element</b>, which contains a list of rule elements that tell the scheduler how to place incoming apps into queues. Rules are applied in the order that they are listed. Rules may take arguments. All rules accept the &quot;create&quot; argument, which indicates whether the rule can create a new queue. &quot;Create&quot; defaults to true; if set to false and the rule would place the app in a queue that is not configured in the allocations file, we continue on to the next rule. The last rule must be one that can never issue a continue. Valid rules are:
<ul>
<li>specified: the app is placed into the queue it requested. If the app requested no queue, i.e. it specified &quot;default&quot;, we continue.</li>
<li>user: the app is placed into a queue with the name of the user who submitted it.</li>
<li>primaryGroup: the app is placed into a queue with the name of the primary group of the user who submitted it.</li>
<li>secondaryGroupExistingQueue: the app is placed into a queue with a name that matches a secondary group of the user who submitted it. The first secondary group that matches a configured queue will be selected.</li>
<li>default: the app is placed into the queue named &quot;default&quot;.</li>
<li>reject: the app is rejected.</li></ul>
<p>An example allocation file is given here:</p>
<div>
<pre>&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;allocations&gt;
&lt;queue name=&quot;sample_queue&quot;&gt;
&lt;minResources&gt;10000 mb,0vcores&lt;/minResources&gt;
&lt;maxResources&gt;90000 mb,0vcores&lt;/maxResources&gt;
&lt;maxRunningApps&gt;50&lt;/maxRunningApps&gt;
&lt;weight&gt;2.0&lt;/weight&gt;
&lt;schedulingPolicy&gt;fair&lt;/schedulingPolicy&gt;
&lt;queue name=&quot;sample_sub_queue&quot;&gt;
&lt;aclSubmitApps&gt;charlie&lt;/aclSubmitApps&gt;
&lt;minResources&gt;5000 mb,0vcores&lt;/minResources&gt;
&lt;/queue&gt;
&lt;/queue&gt;
&lt;user name=&quot;sample_user&quot;&gt;
&lt;maxRunningApps&gt;30&lt;/maxRunningApps&gt;
&lt;/user&gt;
&lt;userMaxAppsDefault&gt;5&lt;/userMaxAppsDefault&gt;
&lt;queuePlacementPolicy&gt;
&lt;rule name=&quot;specified&quot; /&gt;
&lt;rule name=&quot;primaryGroup&quot; create=&quot;false&quot; /&gt;
&lt;rule name=&quot;default&quot; /&gt;
&lt;/queuePlacementPolicy&gt;
&lt;/allocations&gt;</pre></div>
<p>Note that for backwards compatibility with the original FairScheduler, &quot;queue&quot; elements can instead be named as &quot;pool&quot; elements.</p></li></ul></div>
<div class="section">
<h2>Queue Access Control Lists (ACLs)<a name="Queue_Access_Control_Lists_ACLs"></a></h2>
<p>Queue Access Control Lists (ACLs) allow administrators to control who may take actions on particular queues. They are configured with the aclSubmitApps and aclAdministerApps properties, which can be set per queue. Currently the only supported administrative action is killing an application. Anybody who may administer a queue may also submit applications to it. These properties take values in a format like &quot;user1,user2 group1,group2&quot; or &quot; group1,group2&quot;. An action on a queue will be permitted if its user or group is in the ACL of that queue or in the ACL of any of that queue's ancestors. So if queue2 is inside queue1, and user1 is in queue1's ACL, and user2 is in queue2's ACL, then both users may submit to queue2.</p>
<p>The root queue's ACLs are &quot;*&quot; by default which, because ACLs are passed down, means that everybody may submit to and kill applications from every queue. To start restricting access, change the root queue's ACLs to something other than &quot;*&quot;. </p>
<div class="section">
<h3><a name="Administration">Administration</a></h3>
<p>The fair scheduler provides support for administration at runtime through two mechanisms:</p>
<ul>
<li>It is possible to modify minimum shares, limits, weights, preemption timeouts and queue scheduling policies at runtime by editing the allocation file. The scheduler will reload this file 10-15 seconds after it sees that it was modified.</li>
<li>Current applications, queues, and fair shares can be examined through the ResourceManager's web interface, at http://<i>ResourceManager URL</i>/cluster/scheduler.
<p>The following fields can be seen for each queue on the web interface:</p></li>
<li>Used Resources - The sum of resources allocated to containers within the queue. </li>
<li>Num Active Applications - The number of applications in the queue that have received at least one container.</li>
<li>Num Pending Applications - The number of applications in the queue that have not yet received any containers.</li>
<li>Min Resources - The configured minimum resources that are guaranteed to the queue.</li>
<li>Max Resources - The configured maximum resources that are allowed to the queue.</li>
<li>Fair Share - The queue's fair share of resources. Queues may be allocated resources beyond their fair share when other queues aren't using them. A queue whose resource consumption lies at or below its fair share will never have its containers preempted.
<p>In addition to the information that the ResourceManager normally displays about each application, the web interface includes the application's fair share.</p></li></ul></div></div>
</div>
</div>
<div class="clear">
<hr/>
</div>
<div id="footer">
<div class="xright">&#169; 2014
Apache Software Foundation
- <a href="http://maven.apache.org/privacy-policy.html">Privacy Policy</a></div>
<div class="clear">
<hr/>
</div>
</div>
</body>
</html>

Event Timeline