OSDN Git Service

hadoop recipe bug fix.
[metasearch/grid-chef-repo.git] / cookbooks / hadoop / templates / default / conf-1.1 / fair-scheduler.xml.cdh3-example
1 <?xml version="1.0"?>
2
3 <!--
4   This is a sample configuration file for the Fair Scheduler. For details
5   on the options, please refer to the fair scheduler documentation at
6   http://hadoop.apache.org/core/docs/r0.21.0/fair_scheduler.html.
7
8   To create your own configuration, copy this file to conf/fair-scheduler.xml
9   and add the following property in mapred-site.xml to point Hadoop to the
10   file, replacing [HADOOP_HOME] with the path to your installation directory:
11     <property>
12       <name>mapred.fairscheduler.allocation.file</name>
13       <value>[HADOOP_HOME]/conf/fair-scheduler.xml</value>
14     </property>
15
16   Note that all the parameters in the configuration file below are optional,
17   including the parameters inside <pool> and <user> elements. It is only
18   necessary to set the ones you want to differ from the defaults.
19 -->
20
21 <allocations>
22
23   <!-- Example element for configuring a pool -->
24   <pool name="pool1">
25     <!-- Minimum shares of map and reduce slots. Defaults to 0. -->
26     <minMaps>10</minMaps>
27     <minReduces>5</minReduces>
28
29     <!-- Limit on running jobs in the pool. If more jobs are submitted,
30       only the first <maxRunningJobs> will be scheduled at any given time.
31       Defaults to infinity or the global poolMaxJobsDefault value below. -->
32     <maxRunningJobs>5</maxRunningJobs>
33
34     <!-- Number of seconds after which the pool can preempt other pools'
35       tasks to achieve its min share. Requires preemption to be enabled in
36       mapred-site.xml by setting mapred.fairscheduler.preemption to true.
37       Defaults to infinity (no preemption). -->
38     <minSharePreemptionTimeout>300</minSharePreemptionTimeout>
39
40     <!-- Pool's weight in fair sharing calculations. Defaulti is 1.0. -->
41     <weight>1.0</weight>
42   </pool>
43
44   <!-- Example element for configuring a user -->
45   <user name="user1">
46     <!-- Limit on running jobs for the user across all pools. If more
47       jobs than this are submitted, only the first <maxRunningJobs> will
48       be scheduled at any given time. Defaults to infinity or the
49       userMaxJobsDefault value set below. -->
50     <maxRunningJobs>10</maxRunningJobs>
51   </user>
52
53   <!-- Default running job limit pools where it is not explicitly set. -->
54   <poolMaxJobsDefault>20</poolMaxJobsDefault>
55
56   <!-- Default running job limit users where it is not explicitly set. -->
57   <userMaxJobsDefault>10</userMaxJobsDefault>
58
59   <!-- Default min share preemption timeout for pools where it is not
60     explicitly configured, in seconds. Requires mapred.fairscheduler.preemption
61     to be set to true in your mapred-site.xml. -->
62   <defaultMinSharePreemptionTimeout>600</defaultMinSharePreemptionTimeout>
63
64   <!-- Preemption timeout for jobs below their fair share, in seconds. 
65     If a job is below half its fair share for this amount of time, it
66     is allowed to kill tasks from other jobs to go up to its fair share.
67     Requires mapred.fairscheduler.preemption to be true in mapred-site.xml. -->
68   <fairSharePreemptionTimeout>600</fairSharePreemptionTimeout>
69
70 </allocations>