Saturday 1 December 2012

Installation Of Hive In Ubuntu


Hive is a data warehouse system for Hadoop that facilitates easy data summarization, ad-hoc queries, and the analysis of large datasets stored in Hadoop compatible file systems. Hive provides a mechanism to project structure onto this data and query the data using a SQL-like language called HiveQL.

The hive-0.8.1 installation is done in below versions of Linux, Java and Hadoop respectively.

UBUNTU 12.04 LTS
JAVA 1.7.0_09
HADOOP 1.1.0

I have hduser as a dedicated hadoop system user. I had installed my Hadoop in /home/hduser/hadoop folder. Now I am going to install hive  in /home/hduser folder. Change the directory to the hduser and execute below commands.

Download the hive from below URL using wget.

Unzip the tar file.
sudo tar xzf  hive-0.8.1.tar.gz

Change the name to hive.
sudo mv hive-0.8.1 hive

Set the HIVE_HOME path.
I had downloaded the hive to the /home/hduser/hive folder
export HIVE_HOME=/home/hduser/hive
export PATH=$PATH:$HIVE_HOME/bin

Type hive in command line.

To list the tables use show tables hive command.

Installation Of Sqoop In Ubuntu


Apache Sqoop is a tool designed for efficiently transferring bulk data between Apache Hadoop and structured data stores such as relational databases.

The Sqoop-1.4.0-INCUBATING installation is done in below versions of Linux, Java and Hadoop respectively.

UBUNTU 12.04 LTS
JAVA 1.7.0_09
HADOOP 1.1.0

I have hduser as a dedicated hadoop system user. I had installed my Hadoop in /home/hduser/hadoop folder. Now I am going to install sqoop in /home/hduser folder. Change the directory to the hduser and execute below commands.

Download the Sqoop from below URL using wget.

Unzip the tar file.
sudo tar xzf  sqoop-1.4.0-incubating.tar.gz

Change the name to Sqoop.
sudo mv  sqoop-1.4.0-incubating Sqoop

Set the SQOOP_HOME path.
I had downloaded the Sqoop to the /home/hduser/sqoop folder.
export SQOOP_HOME="/home/hduser/sqoop"
export PATH=$PATH:$SQOOP_HOME/bin

Test your installation by typing
sqoop help

Download the appropriate database driver and store it in lib folder /home/hduser/sqoop/lib.

Go to the ->sqoop -> bin and test examples…