Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Hadoop 2.x Administration Cookbook

You're reading from  Hadoop 2.x Administration Cookbook

Product type Book
Published in May 2017
Publisher Packt
ISBN-13 9781787126732
Pages 348 pages
Edition 1st Edition
Languages
Author (1):
Aman Singh Aman Singh
Profile icon Aman Singh

Table of Contents (20) Chapters

Hadoop 2.x Administration Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Customer Feedback
Preface
Hadoop Architecture and Deployment Maintaining Hadoop Cluster HDFS Maintaining Hadoop Cluster – YARN and MapReduce High Availability Schedulers Backup and Recovery Data Ingestion and Workflow Performance Tuning HBase Administration Cluster Planning Troubleshooting, Diagnostics, and Best Practices Security Index

Integration with Hive


In this recipe, we look at how we can integrate Hive with HBase and use Hive to perform all the data operations.

You will have realized from the previous recipe that it gets cumbersome to perform queries using just the native HBase commands.

Getting ready

Before going through the recipe, you must have completed the Hive metastore using MySQL recipe in Chapter 7, Data Ingestion and Workflow, and the Setting up multi-node HBase cluster recipe.

How to do it...

  1. Connect to the edge1.cyrus.com edge node in the cluster and switch to the user hadoop.

  2. We will create an external Hive table and point it to the HBase using the ZooKeeper ensemble.

  3. Create a table in HBase if it is not there already, as shown next:

    hbase> create 'hivetable', 'ratings'
    put 'hivetable', 'row1', 'ratings:userid', 'user1'
    put 'hivetable', 'row1', 'ratings:bookid', 'book1'
    put 'hivetable', 'row1', 'ratings:rating', '1'
    
  4. Connect either using a hive or beeline client and map by creating a table, as shown next...

lock icon The rest of the chapter is locked
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 $15.99/month. Cancel anytime}