Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

After we installed Hadoop in the machine, we then need to install Hive in the second section.


1. Download Hive

Download Hive-0.13.0 from http://hive.apache.org/downloads.html, and unzip and put Hive package together with Hadoop (not necessary to put Hive together with hadoop, but it is easy to manage in the future).


2. Add path to Hive

Add the statements to $HOME/.bashrc to add path

export HIVE_HOME=/ hive/path

export PATH=$PATH:$HIVE_HOME/bin

export PATH=$PATH:$HIVE_HOME/lib


3. Make file on Hadoop file system

Make file on hadoop file system for hive database

hadoop fs –mkdir /user/hive/warehouse

hadoop fs –mkdir /temp


4. Config.sh file

Go to hive/bin, find config.sh and add:

export HIVE_CONF_DIR=$HIVE_CONF_DIR

export HIVE_AUX_JARS_PATH=$HIVE_AUX_JARS_PATH

export HADOOP_INSTALL= /hadoop/path (the same path as in section 1)

Start hive by typing in “hive” in console, you will see hive cli and do queries with Hiveql.

Notice: the hive default metadata is stored by Derby. You can only access to you previous database from the same location where you start hive last time. Otherwise, you would not be able to see your previous database. Also, hive will create metastore_db and a log file anywhere you start hive. To fix it, you may set the hive metastore with mysql. I will write this instruction later.

1 Comment