Introducing HiveServer2
HiveServer2 is an enhancement of HiveServer provided in earlier versions of Hive. The major limitations of HiveServer related to concurrency and authentication is resolved in HiveServer2. HiveServer2 is based on Thrift RPC. It supports multiple types of clients, including JDBC and ODBC.
How to do it…
Assuming that you have installed Hive on your machine, as explained in Chapter 1, Developing Hive. Before starting HiveServer2, you need to add the following property to hive-site.xml
:
<property> <name>hive.server2.thrift.port</name> <value>10000</value> <description>TCP port number to listen on, default 10000 </description> </property>
Starting HiveServer2 is easy. All you need to do is run the following command on the terminal of your machine, as shown in the following screenshots:
# hive --service hiveserver2 &
How it works…
Let's look into the series of actions that starts with HiveServer2...