Apache Hive¶
Below notes form here
Download the Hive 3.1.2
Locate and move to
/opt/binaries/
and extracttar -xzf apache-hive-3.1.2-bin.tar.gz mv apache-hive-3.1.2-bin hive
Following files are needed before you can start the service:
Add to the
PATH
variableexport HIVE_HOME= “/opt/binaries/hive” export PATH=$PATH:$HIVE_HOME/bin
Make sure Hadoop services are up and running
hadoop fs -mkdir /tmp hadoop fs -mkdir /user hadoop fs -mkdir /user/hive hadoop fs -mkdir /user/hive/warehouse hadoop fs -chmod g+w /tmp hadoop fs -chmod g+w /user/hive/warehouse
Head to postgres hive setup
Start the service
bin/hiveserver2
(this is a service doesn’t end, hence needs a terminal!)Test the connection with
bin/beeline -n dataflair -u jdbc:hive2://localhost:10001
Start the metastore as service
hive --service metastore
References
https://data-flair.training/blogs/apache-hive-installation/
https://stackoverflow.com/questions/35449274/java-lang-runtimeexception-unable-to-instantiate-org-apache-hadoop-hive-ql-meta
https://stackoverflow.com/questions/52994585/user-is-not-allowed-to-impersonate-anonymous-state-08s01-code-0-org-apache-had
https://data-flair.training/blogs/apache-hive-metastore/
https://mapr.com/docs/61/Hive/Config-RemotePostgreSQLForHiveMetastore.html
https://www.quora.com/What-is-Hive-Metastore