


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
Hive installation in linux In apache Hadoop.
Typology: Lab Reports
1 / 4
This page cannot be seen from the preview
Don't miss anything!



Step 1 Create a directory named Hive and download Hive tar file. Hive tar file can be downloaded using then wget as shown below - wget http://redrockdigimark.com/apachemirror/hive/stable-2/apache-hive-2.1.0- bin.tar.gz Step 2 The downloaded Hive tar file needs to be extracted using the tar command with –xvf option as shown below - tar –xvf apache-hive-2.1.0-bin.tar.gz Step 3 Verify if the tar file has been uncompressed using the list command ‘ls’ Step 4 To access hive hadoop from any path, its environment variable must be set in the .bashrc file that is present at the $HOME directory. .bashrc file can be opened using the gedit command.
Copy the below contents into the .bashrc file, save and close it - # Set HIVE_HOME export HIVE_HOME=”$HOME/hive/ apache-hive-2.1.0-bin” PATH=$PATH:$HIVE_HOME/bin Export $PATH Step 5 For the environment variables to be set as mentioned in the .bashrc file, the file needs to be sourced using the ‘source’ command- source .bashrc Step 6 For Hive to interact with Hadoop HDFS, it must know the path to the hadoop installation directory. This can be achieved by configuring one of the hadoop hive configuration files hive-config.sh. Set HADOOP_HOME in hive-config.sh export HADOOP_HOME=/opt/hadoop Step 7 Create a directory for the hive warehouse into hdfs. This directory will be used by Hive to store all the data into HDFS-
$HIVE_HOME/bin/schematool –initschema –dbtype derby