Tuesday, July 5, 2016

Mac OSX Hadoop setup

Setup JAVA_HOME

http://stackoverflow.com/questions/22842743/setting-java-home-environment-variable-on-mac-osx-10-9

echo export "JAVA_HOME=\$(/usr/libexec/java_home)" >> ~/.bash_profile
and restart your shell.
If you have multiple JDK versions installed and you want it to be a specific one, you can use the -v flag to java_home like so:
echo export "JAVA_HOME=\$(/usr/libexec/java_home -v 1.7)" >> ~/.bash_profile
https://amodernstory.com/2014/09/23/installing-hadoop-on-mac-osx-yosemite/

Change the version from 2.6.0 to 2.7.2 or what ever the latest version is
Make a user account on HDFS (use your user name...)
https://docs.hortonworks.com/HDPDocuments/Ambari-2.1.2.0/bk_ambari_views_guide/content/_setup_HDFS_user_directory.html


Now run an example Map Reduce job (change the commands to use the /user/ that you created above):

https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html#Example:_WordCount_v1.0

http://stackoverflow.com/questions/22726305/get-error-when-i-run-hbase-shell
. Following the instructions here, before run ./bin/hbase shell command you should use ./bin/start-hbase.sh first. Then my problem was solved.