-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Apache Hive Cookbook
By :

Besides the Hive metastore, Hive components could be broadly classified as Hive clients and Hive servers. Hive servers provide interfaces to make the metastore available to external applications and check for user's authorization and authentication, and Hive clients are various applications used to access and execute Hive queries on the Hadoop cluster.
Let's take a look at its various components.
Hive metastore URIs start a metastore service on the specified port. Metastore provides APIs to query the database, tables, schema, and other entities stored in the RDBMS datastore.
The metastore service starts as a Java process in the backend. You can start the Hive metastore service with the following command:
hive --service metastore &
HiveServer2 is an interface that allows clients to execute Hive queries and get the result. It is based on Thrift RPC and supports multiple clients a against single client in HiveServer. It also provisioned for the authentication and authorization of the user.
The HiveServer2 service also starts as a Java process in the backend. You can start HiveServer2 with the following command:
hive --service hiveserver2 &
The following are the different clients available in Hive to query metastore data or to submit Hive queries to Hive servers.
The following are the various sections included in Hive CLI.
Hive Command-line Interface (CLI) can be used to run Hive queries in either interactive or batch mode.
To run Hive CLI, use the following command:
$ HIVE_HOME/bin/hive
Queries are submitted by username of the user logged in to the UNIX system.
The following are the various sections included in Beeline.
If you have configured HiveServer2, then a Beeline client can be used to interact with Hive.
To run Beeline, use the following command:
$ HIVE_HOME/bin/beeline
Using beeline, a connection could be made to any HiveServer2 instance with any username and password.
Change the font size
Change margin width
Change background colour