Installation of Apache Hive

Hive installation

Get the latest stable release of hive, for instance from spacedump mirror.

$ cd  ~
$ wget ... url...
$ tar -xvzf apache-hive*
$ mv apache-hive* hive

Add the paths of the hive directory to the users environment.

$ cd hive-##
$ export HIVE_HOME=<path>
$ export PATH=$HIVE_HOME/bin:$PATH
$ export HADOOP_USER_CLASSPATH_FIRST=true

Make sure to set the existing hadoop user as owner:

$ chown -R hduser:hadoop hive-###

Start the hive web interface:

$ hive --service hwi

and check with url http://host:9999/hwi

Start the hive cli and create a table and load datafile to the new table:

$hive 
#create table wcount_t(word string, count int) row format delimited fields terminated by '\t' stored as textfile;

load data local inpath '~/license-out.txt/part-r-00000' overwrite into table wcount_t;

#load data inpath '~/license-out.txt/part-r-00000' overwrite into table wcount_t;

more to come....