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 / mapred-env.sh
1 # Licensed to the Apache Software Foundation (ASF) under one or more
2 # contributor license agreements.  See the NOTICE file distributed with
3 # this work for additional information regarding copyright ownership.
4 # The ASF licenses this file to You under the Apache License, Version 2.0
5 # (the "License"); you may not use this file except in compliance with
6 # the License.  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.
15
16
17 export JAVA_HOME=<%= node['java']['java_home'] %>
18
19 # The directory where pid files are stored. /tmp by default.
20 export HADOOP_MAPRED_PID_DIR=<%= node['hadoop']['HADOOP_MAPRED_PID_DIR'] %>
21 # Where log files are stored.  $HADOOP_MAPRED_HOME/logs by default.
22 export HADOOP_MAPRED_LOG_DIR=<%= node['hadoop']['HADOOP_MAPRED_LOG_DIR'] %>
23
24
25 <% if node['hadoop']['install_flavor'] == 'apache' then -%>
26 # export JAVA_HOME=/home/y/libexec/jdk1.6.0/
27
28 export HADOOP_JOB_HISTORYSERVER_HEAPSIZE=1000
29
30 export HADOOP_MAPRED_ROOT_LOGGER=INFO,RFA
31
32 #export HADOOP_JOB_HISTORYSERVER_OPTS=
33 #export HADOOP_MAPRED_LOG_DIR="" # Where log files are stored.  $HADOOP_MAPRED_HOME/logs by default.
34 #export HADOOP_JHS_LOGGER=INFO,RFA # Hadoop JobSummary logger.
35 #export HADOOP_MAPRED_PID_DIR= # The pid files are stored. /tmp by default.
36 #export HADOOP_MAPRED_IDENT_STRING= #A string representing this instance of hadoop. $USER by default
37 #export HADOOP_MAPRED_NICENESS= #The scheduling priority for daemons. Defaults to 0.
38 <% end -%>
39 <%
40 this_file = 'mapred-env.sh'
41 if defined? node['hadoop']['extra_configs'][this_file] \
42   && node['hadoop']['extra_configs'][this_file] != nil then
43   node['hadoop']['extra_configs'][this_file].each do |key, value|
44 -%>
45 export <%= key %>=<%= value %>
46 <%
47   end
48 end
49 -%>
50