Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Apache Hive Cookbook

You're reading from   Apache Hive Cookbook

Arrow left icon
Product type Paperback
Published in Apr 2016
Publisher Packt
ISBN-13 9781782161080
Length 268 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Table of Contents (14) Chapters Close

Preface 1. Developing Hive 2. Services in Hive FREE CHAPTER 3. Understanding the Hive Data Model 4. Hive Data Definition Language 5. Hive Data Manipulation Language 6. Hive Extensibility Features 7. Joins and Join Optimization 8. Statistics in Hive 9. Functions in Hive 10. Hive Tuning 11. Hive Security 12. Hive Integration with Other Frameworks Index

Using HiveServer2 clients

Once we started HiveServer2, we could connect to the server with different clients as per our requirements and run Hive Query Language (HiveQL). The different client includes beeline, JDBC, ODBC, and so on. We will be going through each client in detail.

Getting ready

This recipe requires Hive installed as described in the Installing Hive recipe of Chapter 1, Developing Hive. For connecting with HiveServer2 using a client, you must run HiveServer2, as described in the Introducing HiveServer2 recipe in this chapter.

How to do it…

There are multiple ways of connecting with HiveServer2, as described in the following sections.

Beeline

Beeline is a shell client that could be executed from the terminal by running the following command:

beeline

Once you enter the beeline shell, you can make a connection to the HiveServer2 service as a user using the following command:

!connect jdbc:hive2://localhost:10000 scott tiger org.apache.hive.jdbc.HiveDriver

If the connection is...

You have been reading a chapter from
Apache Hive Cookbook
Published in: Apr 2016
Publisher: Packt
ISBN-13: 9781782161080
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image