Book Image

Apache Hive Cookbook

Book Image

Apache Hive Cookbook

Overview of this book

Hive was developed by Facebook and later open sourced in Apache community. Hive provides SQL like interface to run queries on Big Data frameworks. Hive provides SQL like syntax also called as HiveQL that includes all SQL capabilities like analytical functions which are the need of the hour in today’s Big Data world. This book provides you easy installation steps with different types of metastores supported by Hive. This book has simple and easy to learn recipes for configuring Hive clients and services. You would also learn different Hive optimizations including Partitions and Bucketing. The book also covers the source code explanation of latest Hive version. Hive Query Language is being used by other frameworks including spark. Towards the end you will cover integration of Hive with these frameworks.
Table of Contents (19 chapters)
Apache Hive Cookbook
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Preface
Index

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:

  • A Java service...