Time for action – installing Hive
Let's now set up Hive so we can start using it in action.
- Download the latest stable version of Hive and move it to the location to which you wish to have it installed:
$ mv hive-0.8.1.tar.gz /usr/local
- Uncompress the package:
$ tar –xzf hive-0.8.1.tar.gz
- Set the
HIVE_HOME
variable to the installation directory:$ export HIVE_HOME=/usr/local/hive
- Add the Hive home directory to the path variable:
$ export PATH=${HIVE_HOME}/bin:${PATH}
- Create directories required by Hive on HDFS:
$ hadoop fs -mkdir /tmp $ hadoop fs -mkdir /user/hive/warehouse
- Make both of these directories group writeable:
$ hadoop fs -chmod g+w /tmp $ hadoop fs -chmod g+w /user/hive/warehouse
- Try to start Hive:
$ hive
You will receive the following ...
Get Hadoop: Data Processing and Modelling now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.