|
| 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