MAC OSX Hadoop+Hive环境快速搭建

环境

brew安装 : http://brew.sh

安装

brew install hadoop hive

环境配置

vim ~/.zshrc

#java
export JAVA_HOME=`/usr/libexec/java_home`
#hadoop & hive
export HADOOP_HOME=$(brew --prefix hadoop)
export HIVE_HOME=$(brew --prefix hive)/libexec
export HCAT_HOME=$(brew --prefix hive)/libexec/hcatalog
export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib/native
export HADOOP_OPTS="-Djava.library.path=$HADOOP_HOME/lib"

source ~/.zshrc

测试

hadoop version  && hive -h