HIVE installation
HIVE installation
1)copy the hive tar file to your home path (/home/hduser/install) and extract using
below command cd home/hduser/install/
tar xvzf apache-hive-0.14.0-bin.tar.gz
sudo mv apache-hive-0.14.0-bin /usr/local/hive
2)Make an entry in the bash profile like
below, vi .bashrc
export
HIVE HOME=/usr/local/hive
export
PATH=$PATH:$HIVE HOME/
bin
3)After you complete the above steps execute below commands to create directories and give
permissions
hadoop fs -mkdir p
/user/hivelwarehouse/ hadoop fs
chmod gtw /user/hive/warehouse
hadoop fs -chmod gtw /tmp
4) Cd to bin folder inside hive
pathcd /usr/local/hive/bin
put an entry like
below, vi hive
config.sh
export HADOOP HOME=/usr/local/hadoop
A. Create Database
B.Select Database
use retail;
set hive.cli.print.current.db-true;
cd /home/hduser/hive/data/
hadoop fs -copyFromLocal txns
txnsl