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
8 # http://www.apache.org/licenses/LICENSE-2.0
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.
17 export JAVA_HOME=<%= node['java']['java_home'] %>
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'] %>
25 <% if node['hadoop']['install_flavor'] == 'apache' then -%>
26 # export JAVA_HOME=/home/y/libexec/jdk1.6.0/
28 export HADOOP_JOB_HISTORYSERVER_HEAPSIZE=1000
30 export HADOOP_MAPRED_ROOT_LOGGER=INFO,RFA
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.
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|
45 export <%= key %>=<%= value %>