Skip to content

Instantly share code, notes, and snippets.

@nikkisharma536
Last active December 28, 2018 11:14
Show Gist options
  • Save nikkisharma536/c499484850be32166e187ba7b897a395 to your computer and use it in GitHub Desktop.
Save nikkisharma536/c499484850be32166e187ba7b897a395 to your computer and use it in GitHub Desktop.
hadoop-Env variable
##Add to ~/.profile:
export JAVA_HOME=$(/usr/libexec/java_home)
export HIVE_AUX_JARS_PATH=/usr/local/Cellar/hadoop/3.1.1/libexec/share/hadoop/tools/lib/
export HADOOP_CLASSPATH=$HADOOP_CLASSPATH:/usr/local/Cellar/hadoop/3.1.1/libexec/share/hadoop/tools/lib/*
##Note : That should work,
# else, if that doesn't work,
# use this command to add all the jars shipped with Hadoop:
# export HADOOP_CLASSPATH=$(find /usr/local/Cellar/hadoop/3.1.1 -name '*.jar' | xargs echo | tr ' ' ':')
##Hadoop shortcut aliases :
alias hstart="/usr/local/Cellar/hadoop/3.1.1/sbin/start-dfs.sh;/usr/local/Cellar/hadoop/3.1.1/sbin/start-yarn.sh"
alias hstop="/usr/local/Cellar/hadoop/3.1.1/sbin/stop-yarn.sh;/usr/local/Cellar/hadoop/3.1.1/sbin/stop-dfs.sh"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment