3 Licensed under the Apache License, Version 2.0 (the "License");
4 you may not use this file except in compliance with the License.
5 You may obtain a copy of the License at
7 http://www.apache.org/licenses/LICENSE-2.0
9 Unless required by applicable law or agreed to in writing, software
10 distributed under the License is distributed on an "AS IS" BASIS,
11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 See the License for the specific language governing permissions and
13 limitations under the License. See accompanying LICENSE file.
17 <!-- Site specific YARN configuration properties -->
19 <name>this.resourcemanager.fqdn</name>
20 <value><%= node['hadoop']['this.resourcemanager.fqdn'] %></value>
21 <!-- <value>${this.cluster.name}-rm.${this.domain}</value> -->
25 <name>yarn.log-aggregation-enable</name>
26 <value><%= node['hadoop']['yarn.log-aggregation-enable'] %></value>
29 <name>yarn.resourcemanager.scheduler.class</name>
30 <value><%= node['hadoop']['yarn.resourcemanager.scheduler.class'] %></value>
31 <description>In case you do not want to use the default scheduler</description>
34 yarn_nodemanager_local_dirs = ''
35 @active_vol_nums.to_i.times {|vol_num|
36 yarn_nodemanager_local_dirs = yarn_nodemanager_local_dirs == '' ? '' : "#{yarn_nodemanager_local_dirs},"
37 yarn_nodemanager_local_dirs = "#{yarn_nodemanager_local_dirs}#{node['grid']['vol_root']}/#{vol_num}/var/lib/${user.name}/nm/local"
41 <name>yarn.nodemanager.local-dirs</name>
42 <value><%= yarn_nodemanager_local_dirs %></value>
43 <!-- <value>/grid/vol/0/var/lib/${user.name}/nm/local,/grid/vol/1/var/lib/${user.name}/nm/local</value> -->
44 <description>the local directories used by the nodemanager
45 (default: /tmp/nm-local-dir)</description>
48 <name>yarn.nodemanager.resource.memory-mb</name>
49 <value><%= node['hadoop']['yarn.nodemanager.resource.memory-mb'] %></value>
50 <description>Amount of physical memory, in MB, that can be allocated
51 for containers. (default: 8192)</description>
54 <name>yarn.nodemanager.resource.cpu-cores</name>
55 <value><%= node['hadoop']['yarn.nodemanager.resource.cpu-cores'] %></value>
56 <description>Number of CPU cores that can be allocated
57 for containers. (default: 8)</description>
60 <name>yarn.nodemanager.remote-app-log-dir</name>
61 <value><%= node['hadoop']['yarn.nodemanager.remote-app-log-dir'] %></value>
62 <description>directory on hdfs where the application logs are moved to
63 (default: /tmp/logs)</description>
66 yarn_nodemanager_log_dirs = ''
67 @active_vol_nums.to_i.times {|vol_num|
68 yarn_nodemanager_log_dirs = yarn_nodemanager_log_dirs == '' ? '' : "#{yarn_nodemanager_log_dirs},"
69 yarn_nodemanager_log_dirs = "#{yarn_nodemanager_log_dirs}#{node['grid']['vol_root']}/#{vol_num}/var/log/${user.name}/nm"
73 <name>yarn.nodemanager.log-dirs</name>
74 <value><%= yarn_nodemanager_log_dirs %></value>
75 <!-- <value>/grid/vol/0/var/log/${user.name}/nm,/grid/vol/1/var/log/${user.name}/nm</value> -->
76 <description>the directories used by Nodemanagers as log directories
77 (default: /tmp/logs)</description>
80 <name>yarn.nodemanager.aux-services</name>
81 <value><%= node['hadoop']['yarn.nodemanager.aux-services'] %></value>
82 <description>shuffle service that needs to be set for Map Reduce to run</description>
85 <name>yarn.application.classpath</name>
86 <value><%= node['hadoop']['yarn.application.classpath'] %></value>
87 <description>Classpath for typical applications.</description>
91 <name>yarn.resourcemanager.nodes.include-path</name>
92 <value><%= node['hadoop']['yarn.resourcemanager.nodes.include-path'] %></value>
93 <description>Path to file with nodes to include.</description>
96 <name>yarn.resourcemanager.nodes.exclude-path</name>
97 <value><%= node['hadoop']['yarn.resourcemanager.nodes.exclude-path'] %></value>
98 <description>Path to file with nodes to exclude.</description>
102 <name>yarn.nodemanager.admin-env</name>
103 <value><%= node['hadoop']['yarn.nodemanager.admin-env'] %></value>
106 <% if node['hadoop']['with_security'] then -%>
108 <name>yarn.acl.enable</name>
109 <value><%= node['hadoop']['yarn.acl.enable'] %></value>
112 <name>yarn.admin.acl</name>
113 <value><%= node['hadoop']['yarn.admin.acl'] %></value>
116 <name>yarn.resourcemanager.principal</name>
117 <value><%= node['hadoop']['yarn.resourcemanager.principal'] %></value>
118 <!-- <value>yarn/_HOST@${this.realm}</value> -->
121 <name>yarn.resourcemanager.keytab</name>
122 <value><%= node['hadoop']['yarn.resourcemanager.keytab'] %></value>
125 <name>yarn.nodemanager.principal</name>
126 <value><%= node['hadoop']['yarn.nodemanager.principal'] %></value>
127 <!-- <value>yarn/_HOST@${this.realm}</value> -->
130 <name>yarn.nodemanager.keytab</name>
131 <value><%= node['hadoop']['yarn.nodemanager.keytab'] %></value>
135 <name>yarn.nodemanager.container-executor.class</name>
136 <value><%= node['hadoop']['yarn.nodemanager.container-executor.class'] %></value>
139 <name>yarn.nodemanager.linux-container-executor.group</name>
140 <value><%= node['hadoop']['yarn.nodemanager.linux-container-executor.group'] %></value>
143 <name>yarn.nodemanager.linux-container-executor.resources-handler.class</name>
144 <value><%= node['hadoop']['yarn.nodemanager.linux-container-executor.resources-handler.class'] %></value>
145 <description>The class which should help the LCE handle resources.</description>
148 <name>yarn.nodemanager.linux-container-executor.cgroups.hierarchy</name>
149 <value><%= node['hadoop']['yarn.nodemanager.linux-container-executor.cgroups.hierarchy'] %></value>
150 <description>The cgroups hierarchy under which to place YARN proccesses (cannot contain commas).
151 If yarn.nodemanager.linux-container-executor.cgroups.mount is false (that is, if cgroups have
152 been pre-configured), then this cgroups hierarchy must already exist and be writable by the
153 NodeManager user, otherwise the NodeManager may fail.
154 Only used when the LCE resources handler is set to the CgroupsLCEResourcesHandler.</description>
157 <name>yarn.nodemanager.linux-container-executor.cgroups.mount</name>
158 <value><%= node['hadoop']['yarn.nodemanager.linux-container-executor.cgroups.mount'] %></value>
159 <description>Whether the LCE should attempt to mount cgroups if not found.
160 Only used when the LCE resources handler is set to the CgroupsLCEResourcesHandler.</description>
163 <name>yarn.nodemanager.linux-container-executor.cgroups.mount-path</name>
164 <value><%= node['hadoop']['yarn.nodemanager.linux-container-executor.cgroups.mount-path'] %></value>
165 <description>Where the LCE should attempt to mount cgroups if not found. Common locations
166 include /sys/fs/cgroup and /cgroup; the default location can vary depending on the Linux
167 distribution in use. This path must exist before the NodeManager is launched.
168 Only used when the LCE resources handler is set to the CgroupsLCEResourcesHandler, and
169 yarn.nodemanager.linux-container-executor.cgroups.mount is true.</description>
173 this_file = 'mapred-site.xml'
174 if defined? node['hadoop']['extra_configs'][this_file] \
175 && node['hadoop']['extra_configs'][this_file] != nil then
176 node['hadoop']['extra_configs'][this_file].each do |key,value|
179 <name><%= key %></name>
180 <value><%= value %></value>