


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
A step-by-step guide on installing and configuring apache hive on a standalone system and as a node in a cluster. Apache hive is a data warehousing infrastructure built on top of hadoop for data summarization, query, and analysis. It supports large datasets stored in hdfs and amazon s3 filesystem, and provides an sql-like language called hiveql.
What you will learn
Typology: Study notes
1 / 4
This page cannot be seen from the preview
Don't miss anything!
data:text/html;charset=utf 8,%3Ch1%20style%3D%22box sizing%3A%20border box%3B%20margin top%3A%200px%3B%20font weight%3A%20700%3B%2… 1/
user@ubuntu:~$ cd /usr/lib/ user@ubuntu:~$ sudo mkdir hive user@ubuntu:~$ cd Downloads user@ubuntu:~$ sudo mv apache‐hive‐0.13.0‐bin /usr/lib/hive
user@ubuntu:~$ cd user@ubuntu:~$ sudo gedit ~/.bashrc
export HIVE_HOME="/usr/lib/hive/apache‐hive‐0.13.0‐bin" PATH=$PATH:$HIVE_HOME/bin
data:text/html;charset=utf 8,%3Ch1%20style%3D%22box sizing%3A%20border box%3B%20margin top%3A%200px%3B%20font weight%3A%20700%3B%2… 2/
export PATH
Setting HADOOP_PATH in HIVE config.sh
user@ubuntu:~$ cd /usr/lib/hive/apache‐hive‐0.13.0‐bin/bin user@ubuntu:~$ sudo gedit hive‐config.sh
HIVE_CONF_DIR="${HIVE_CONF_DIR:‐$HIVE_HOME/conf" export HIVE_CONF_DIR=$HIVE_CONF_DIR export HIVE_AUX_JARS_PATH=$HIVE_AUX_JARS_PATH
export HADOOP_HOME=/usr/local/hadoop (write the path where hadoop file is there)
Create Hive directories within HDFS
user@ubuntu:~$ hadoop fs ‐mkdir /usr/hive/warehouse
Setting READ/WRITE permission for table
user@ubuntu:~$ hadoop fs ‐chmod g+w /usr/hive/warehouse
HIVE launch
user@ubuntu:~$ hive
data:text/html;charset=utf 8,%3Ch1%20style%3D%22box sizing%3A%20border box%3B%20margin top%3A%200px%3B%20font weight%3A%20700%3B%2… 4/
Writing a Script
user@ubuntu:~$ sudo gedit sample.sql
create database sample; use sample; create table product(product int, productname string, price float)[row format delimited fields terminated by describe product;
select * from product;
user@ubuntu:~$ sudo gedit input_to_product.txt user@ubuntu:~$ cd /usr/lib/hive/apache‐hive‐0.13.0‐bin/ $ bin/hive ‐f /home/hduser/sample.sql