OSDN Git Service

add Apache Hadoop 2.2.0 support to the hadoop cookbooks.
[metasearch/grid-chef-repo.git] / cookbooks / hadoop / templates / default / etc-2.2 / hadoop / core-site.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
3 <!--
4   Licensed under the Apache License, Version 2.0 (the "License");
5   you may not use this file except in compliance with the License.
6   You may obtain a copy of the License at
7
8     http://www.apache.org/licenses/LICENSE-2.0
9
10   Unless required by applicable law or agreed to in writing, software
11   distributed under the License is distributed on an "AS IS" BASIS,
12   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   See the License for the specific language governing permissions and
14   limitations under the License. See accompanying LICENSE file.
15 -->
16
17 <!-- Put site-specific property overrides in this file. -->
18
19 <configuration>
20     <property>
21         <name>this.cluster.name</name>
22         <value><%= node['hadoop']['this.cluster.name'] %></value>
23         <!-- <value>pleiades</value> -->
24     </property>
25     <property>
26         <name>this.domain</name>
27         <value><%= node['hadoop']['this.domain'] %></value>
28         <!-- <value>grid.example.com</value> -->
29     </property>
30 <% if node['hadoop']['with_security'] then -%>
31     <property>
32         <name>this.realm</name>
33         <value><%= node['hadoop']['this.realm'] %></value>
34         <!-- <value>GRID.EXAMPLE.COM</value> -->
35     </property>
36     <property>
37         <name>this.keytab.dir</name>
38         <value><%= node['hadoop']['this.keytab.dir'] %></value>
39     </property>
40 <% end -%>
41     <property>
42         <name>this.namenode.fqdn</name>
43         <value><%= node['hadoop']['this.namenode.fqdn'] %></value>
44         <!-- <value>${this.cluster.name}-nn.${this.domain}</value> -->
45     </property>
46
47     <property>
48         <name>fs.defaultFS</name>
49         <value><%= node['hadoop']['fs.defaultFS'] %></value>
50     </property>
51     <property>
52         <name>hadoop.tmp.dir</name>
53         <value><%= node['hadoop']['hadoop.tmp.dir'] %></value>
54     </property>
55
56 <% if node['hadoop']['with_security'] then -%>
57     <property>
58         <name>hadoop.security.authentication</name>
59         <value><%= node['hadoop']['hadoop.security.authentication'] %></value>
60         <description>
61             Set the authentication for the cluster. Valid values are: simple or
62             kerberos.
63         </description>
64     </property>
65     <property>
66         <name>hadoop.security.authorization</name>
67         <value><%= node['hadoop']['hadoop.security.authorization'] %></value>
68         <description>
69             Enable authorization for different protocols.
70         </description>
71     </property>
72     <property>
73         <name>hadoop.security.auth_to_local</name>
74         <value><%= node['hadoop']['hadoop.security.auth_to_local'] %></value>
75     </property>
76     <property>
77         <name>hadoop.security.group.mapping</name>
78         <value><%= node['hadoop']['hadoop.security.group.mapping'] %></value>
79     </property>
80     <property>
81         <name>hadoop.security.groups.cache.secs</name>
82         <value><%= node['hadoop']['hadoop.security.groups.cache.secs'] %></value>
83     </property>
84     <property>
85         <name>hadoop.kerberos.kinit.command</name>
86         <value><%= node['hadoop']['hadoop.kerberos.kinit.command'] %></value>
87     </property>
88
89     <property>
90         <name>hadoop.http.filter.initializers</name>
91         <value><%= node['hadoop']['hadoop.http.filter.initializers'] %></value>
92         <!-- <value>org.apache.hadoop.http.lib.StaticUserWebFilter</value> -->
93         <description>The name of a class that initializes an input filter for Jetty.
94             This filter will always return Dr.Who as the web user when the servlets
95             query for the authenticated user </description>
96     </property>
97     <property>
98         <name>hadoop.http.authentication.signature.secret.file</name>
99         <value><%= node['hadoop']['hadoop.http.authentication.signature.secret.file'] %></value>
100     </property>
101     <property>
102         <name>hadoop.http.authentication.cookie.domain</name>
103         <value><%= node['hadoop']['hadoop.http.authentication.cookie.domain'] %></value>
104     </property>
105     <property>
106         <name>hadoop.http.authentication.type</name>
107         <value><%= node['hadoop']['hadoop.http.authentication.type'] %></value>
108         <description>Defines authentication used for the HTTP web-consoles.
109             The supported values are: simple | kerberos | #AUTHENTICATION_HANDLER_CLASSNAME#.
110             The dfeault value is simple.</description>
111     </property>
112     <property>
113         <name>hadoop.http.authentication.kerberos.principal</name>
114         <value><%= node['hadoop']['hadoop.http.authentication.kerberos.principal'] %></value>
115         <!-- <value>HTTP/_HOST@${this.realm}</value>
116             _HOST N/A!: v1.0, HDP1.2; OK: v2.0, CDH3, CDH4 -->
117     </property>
118     <property>
119         <name>hadoop.http.authentication.kerberos.keytab</name>
120         <value><%= node['hadoop']['hadoop.http.authentication.kerberos.keytab'] %></value>
121     </property>
122
123   <%- node['hadoop']['hadoop.proxyuser'].each do |name, values| -%>
124     <property>
125         <name>hadoop.proxyuser.<%= name %>.hosts</name>
126         <value><%= values['hosts'] %></value>
127     </property>
128     <property>
129         <name>hadoop.proxyuser.<%= name %>.groups</name>
130         <value><%= values['groups'] %></value>
131     </property>
132   <%- end -%>
133 <% end -%>
134 <%
135 this_file = 'core-site.xml'
136 if defined? node['hadoop']['extra_configs'][this_file] \
137   && node['hadoop']['extra_configs'][this_file] != nil then
138   node['hadoop']['extra_configs'][this_file].each do |key,value|
139 -%>
140     <property>
141         <name><%= key %></name>
142         <value><%= value %></value>
143     </property>
144 <%
145   end
146 end 
147 -%>
148 </configuration>