Thursday, October 15, 2015

Hadoop - env variables in hadoop conf dir

Login with your user
Go to
/etc/hadoop/conf

To check any values, always use 'cat' or 'more' command. Use grep to search for a particular text
To make any change use 'vi' command
cat <filename>  |  grep hdfs
more <filename>  
vi filename


# The only required environment variable is JAVA_HOME.  All others are
# optional.  When running a distributed configuration it is best to
# set JAVA_HOME in this file, so that it is correctly defined on
# remote nodes.

# The java implementation to use.  Required.
# export JAVA_HOME=/opt/teradata/jvm64/jdk7

export HADOOP_YARN_HOME=/usr/lib/hadoop-yarn           in yarn-env.sh
export JAVA_HOME=/usr/java/jdk1.6.0_38                                     in hadoop-env.sh
export HADOOP_HOME=${HADOOP_HOME:-/usr/lib/hadoop}
export HADOOP_CONF_DIR=${HADOOP_CONF_DIR:-/etc/hadoop/conf}
export HADOOP_MAPRED_PID_DIR=/var/run/hadoop-mapreduce/$USER
export HADOOP_LOG_DIR=/var/opt/teradata/log/hadoop/$USER
export HADOOP_CLASSPATH=${HADOOP_CLASSPATH}${JAVA_JDBC_LIBS}:${MAPREDUCE_LIBS}