Apache Hive is a data warehouse system mostly used for data summarization for structured data type files. Hive is a one of the component of Hadoop built on top of HDFS and is a data ware house kind of system in Hadoop. It is used in Tabular form(Structured data) not for FLAT files.
Step:1 Download the hive-1.2.2 tar ball from Apache Mirrors official website
Step 2: Extract the tar ball file in your path using below command:
Step 3:Update HIVE_HOME & PATH variables in bashrc file
After update the .bashrc file will changes then go to the next step
Step 5: To check the bashrc changes,open a new terminal and type the command
Step 6: Remove jline-0.9.94.jar file from the below path to avoid the incompatibility issues of Hive version with hadoop-2.6.0
Step 7: There are 2 types of Meta Stores we can configure in Hive to store metadata.
Internally using Derby in Hive. It is only for one user
Externally using MySQL is used multiple users. In case your conf file does not contain hive-site.xml file then
Create hive-site.xml file
Step 8: Configure hive-site.xml file with MySQL configuration and add the below content:
Step 9: For External Meta Store ‘MySQL’ , we need MySQL connector jar file
Step 10: MySQL connector jar file into $HIVE_HOME/lib path
Step 11: Run hive command in terminal but it will showing connection refused
Due to daemons are not working so it is necessary to start all daemons other wise hive is not working
Step 11: First start all daemons using start-all.sh command
Step 12: Now successfully run the hive in your machine
Step 13: How to Check Hive version using below command:
Why we use HIVE?
Because data summarization or querying tabular data in Hadoop system. Default hive database Derby it is only for ine user. Mostly MySQL used for large data and multiple users.