Skip to content

Commit 54be655

Browse files
committed
HADOOP-8287. etc/hadoop is missing hadoop-env.sh. Contributed by Eli Collins
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1339906 13f79535-47bb-0310-9956-ffa450edef68
1 parent 488ccc5 commit 54be655

File tree

2 files changed

+76
-0
lines changed

2 files changed

+76
-0
lines changed

hadoop-common-project/hadoop-common/CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,8 @@ Release 2.0.1-alpha - UNRELEASED
181181
HADOOP-8406. CompressionCodecFactory.CODEC_PROVIDERS iteration is
182182
thread-unsafe (todd)
183183

184+
HADOOP-8287. etc/hadoop is missing hadoop-env.sh (eli)
185+
184186
Release 2.0.0-alpha - UNRELEASED
185187

186188
INCOMPATIBLE CHANGES
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Copyright 2011 The Apache Software Foundation
2+
#
3+
# Licensed to the Apache Software Foundation (ASF) under one
4+
# or more contributor license agreements. See the NOTICE file
5+
# distributed with this work for additional information
6+
# regarding copyright ownership. The ASF licenses this file
7+
# to you under the Apache License, Version 2.0 (the
8+
# "License"); you may not use this file except in compliance
9+
# with the License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.
18+
19+
# Set Hadoop-specific environment variables here.
20+
21+
# The only required environment variable is JAVA_HOME. All others are
22+
# optional. When running a distributed configuration it is best to
23+
# set JAVA_HOME in this file, so that it is correctly defined on
24+
# remote nodes.
25+
26+
# The java implementation to use.
27+
export JAVA_HOME=${JAVA_HOME}
28+
29+
# The jsvc implementation to use. Jsvc is required to run secure datanodes.
30+
#export JSVC_HOME=${JSVC_HOME}
31+
32+
export HADOOP_CONF_DIR=${HADOOP_CONF_DIR:-"/etc/hadoop"}
33+
34+
# Extra Java CLASSPATH elements. Automatically insert capacity-scheduler.
35+
for f in $HADOOP_HOME/contrib/capacity-scheduler/*.jar; do
36+
if [ "$HADOOP_CLASSPATH" ]; then
37+
export HADOOP_CLASSPATH=$HADOOP_CLASSPATH:$f
38+
else
39+
export HADOOP_CLASSPATH=$f
40+
fi
41+
done
42+
43+
# The maximum amount of heap to use, in MB. Default is 1000.
44+
#export HADOOP_HEAPSIZE=
45+
#export HADOOP_NAMENODE_INIT_HEAPSIZE=""
46+
47+
# Extra Java runtime options. Empty by default.
48+
export HADOOP_OPTS="-Djava.net.preferIPv4Stack=true $HADOOP_CLIENT_OPTS"
49+
50+
# Command specific options appended to HADOOP_OPTS when specified
51+
export HADOOP_NAMENODE_OPTS="-Dhadoop.security.logger=${HADOOP_SECURITY_LOGGER:-INFO,RFAS} -Dhdfs.audit.logger=${HDFS_AUDIT_LOGGER:-INFO,NullAppender} $HADOOP_NAMENODE_OPTS"
52+
export HADOOP_DATANODE_OPTS="-Dhadoop.security.logger=ERROR,RFAS $HADOOP_DATANODE_OPTS"
53+
54+
export HADOOP_SECONDARYNAMENODE_OPTS="-Dhadoop.security.logger=${HADOOP_SECURITY_LOGGER:-INFO,RFAS} -Dhdfs.audit.logger=${HDFS_AUDIT_LOGGER:-INFO,NullAppender} $HADOOP_SECONDARYNAMENODE_OPTS"
55+
56+
# The following applies to multiple commands (fs, dfs, fsck, distcp etc)
57+
export HADOOP_CLIENT_OPTS="-Xmx128m $HADOOP_CLIENT_OPTS"
58+
#HADOOP_JAVA_PLATFORM_OPTS="-XX:-UsePerfData $HADOOP_JAVA_PLATFORM_OPTS"
59+
60+
# On secure datanodes, user to run the datanode as after dropping privileges
61+
export HADOOP_SECURE_DN_USER=${HADOOP_SECURE_DN_USER}
62+
63+
# Where log files are stored. $HADOOP_HOME/logs by default.
64+
export HADOOP_LOG_DIR=${HADOOP_LOG_DIR}/$USER
65+
66+
# Where log files are stored in the secure data environment.
67+
export HADOOP_SECURE_DN_LOG_DIR=${HADOOP_LOG_DIR}/${HADOOP_HDFS_USER}
68+
69+
# The directory where pid files are stored. /tmp by default.
70+
export HADOOP_PID_DIR=${HADOOP_PID_DIR}
71+
export HADOOP_SECURE_DN_PID_DIR=${HADOOP_PID_DIR}
72+
73+
# A string representing this instance of hadoop. $USER by default.
74+
export HADOOP_IDENT_STRING=$USER

0 commit comments

Comments
 (0)