Just like with Pig, Hive also provides an alternative programming model to write data processing jobs. It allows users to map their data into a relational model and process them through SQL-like commands.
Due to its SQL-style language, Hive is very natural for users who were doing data warehousing using relational databases. Therefore, it is often used as a data warehousing tool.
This section describes how to install Hive.
> tar xvf hive-0.9.0.tar.gz
> tar xvfhadoop-1.0.0.tar.gz
>export HIVE_HOME=<hive distribution> >export HADOOP_HOME=<hadoopdistribution>
conf/hive-site.xml
file.<configuration> <property> <name>mapred.job.tracker</name> <value>local</value> </property> </configuration>
HADOOP_HOME/build
folder to avoid a bug that will cause Hive to fail.HIVE_HOME
:> cd hive-0.9.0 > bin/hive WARNING: org.apache.hadoop.metrics.jvm.EventCounter is deprecated. Please use org.apache.hadoop.log.metrics.EventCounter in all the log4j.properties files. Logging initialized using configuration in jar:file:/Users/srinath/playground/hadoop-book/hive-0.9.0/lib/hive-common-0.9.0.jar!/hive-log4j.properties Hive history file=/tmp/srinath/hive_job_log_srinath_201206072032_139699150.txt