Book Image

Elasticsearch for Hadoop

By : Vishal Shukla
Book Image

Elasticsearch for Hadoop

By: Vishal Shukla

Overview of this book

Table of Contents (15 chapters)
Elasticsearch for Hadoop
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

SQLizing Elasticsearch with Hive


Hive has held a special place in the Hadoop ecosystem for a long time because it provides a well-known SQL interface to data in Hadoop. Hive is widely used for data warehousing queries to provide summarizations or perform data analysis.

Setting up Apache Hive

Here are the steps to set up Apache Hive 1.2.1:

  1. Download the Hive distribution using the following command:

    $ sudo wget –O /usr/local/hive.tar.gz http://mirror.sdunix.com/apache/hive/hive-1.2.1/apache-hive-1.2.1-bin.tar.gz 
    
  2. Extract Hive to the desired location with a convenient name as follows:

    $ cd /usr/local
    $ sudo tar –xvf hive.tar.gz
    $ sudo mv apache-hive-1.2.1-bin hive
    
  3. Export the required environment variables by appending the following lines in the /home/eshadoop/.bashrc file:

    export HIVE_HOME=/usr/local/hive
    export PATH=$PATH:$HIVE_HOME/bin
    export CLASSPATH=$CLASSPATH:/usr/local/hive/lib/*:. 
    export HADOOP_USER_CLASSPATH_FIRST=true 
    export HIVE_AUX_JARS_PATH=/opt/lib/elasticsearch-hadoop-2.1.1.jar...