Admin How To
46 | DECEMBER 2017 | OPEN SOURCE FOR YOU | http://www.OpenSourceForU.com
In the command prompt, type the following commands:
sudo mv hive /usr/local/hive
sudo gedit ~/.bashrc
# Set HIVE_HOME export HIVE_HOME=/usr/local/hive
PATH=$PATH:$HIVE_HOME/bin export PATH
user@ubuntu:~$ cd /usr/local/hive
user@ubuntu:~$ sudo gedit hive-config.sh
Go to the line where the following statements are written:
# Allow alternate conf dir location.
By: Prof. Prakash Patel and Prof. Dulari Bhatt
Prof. Prakash Patel is an assistant professor in the IT
department of the Gandhinagar Institute of Technology. You
can contact him at [email protected].
Prof. Dulari Bhatt is also an assistant professor in the IT
department of the Gandhinagar Institute of Technology. You
can contact her at [email protected].
[1] https://www.dezyre.com/article/difference-between-
pig-and-hive-the-two-key-components-of-hadoop-
ecosystem/79
[2] https://intellipaat.com/blog/what-is-apache-hive/
[3] https://hortonworks.com/apache/hive/
[4] https://www.tutorialspoint.com/hive/
[5] https://www.guru99.com/hive-tutorials.html
References
Table 2
Pig Hive
A procedural data flow
language
A declarative SQLish lan-
guage
For programming For creating reports
Mainly used by research-
ers and programmers Mainly used by data analysts
Operates on the client
side of a cluster
Operates on the server side
of a cluster
Does not have a
dedicated metadata
database
Makes use of the exact vari-
ation of the dedicated SQL
DDL language by defining
tables beforehand
Pig is SQL-like but varies
to a great extent
Directly leverages SQL and
is easy to learn for database
experts
Pig supports the Avro file
format
Hive does not support this
file format
HIVE_CONF_DIR=”${HIVE_CONF_DIR:-$HIVE_HOME/conf”
export HIVE_CONF_DIR=$HIVE_CONF_DIR
export HIVE_AUX_JARS_PATH=$HIVE_AUX_JARS_PATH
Below this line, write the following code:
export HADOOP_HOME=/usr/local/hadoop
(write the path where the Hadoop file is)
Now, start Hadoop. Type hive, and you will
see the tables 2.
Pig vs Hive
Table 2 illustrates the differences between pig and Hive.