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

You're reading from  HBase Administration Cookbook

Product type Book
Published in Aug 2012
Publisher Packt
ISBN-13 9781849517140
Pages 332 pages
Edition 1st Edition
Languages
Author (1):
Yifeng Jiang Yifeng Jiang
Profile icon Yifeng Jiang

Table of Contents (16) Chapters

HBase Administration Cookbook
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
Setting Up HBase Cluster Data Migration Using Administration Tools Backing Up and Restoring HBase Data Monitoring and Diagnosis Maintenance and Security Troubleshooting Basic Performance Tuning Advanced Configurations and Tuning

Executing Java methods from HBase Shell


HBase Shell is written in JRuby. As JRuby runs within Java Virtual Machine (JVM) , it is very easy to execute Java methods from HBase Shell. HBase ships with many Java utility classes; the ability to execute Java methods from HBase Shell makes it possible to import and use these utilities directly from HBase Shell.

We will demonstrate two examples of how to call Java method from HBase Shell, in this recipe. The first one converts the timestamp of the HBase Shell output into a readable date format. The second one imports an HBase filter class, and performs the filtering on the scanner of the scan command.

Getting ready

Start your HBase cluster, create a table, and put some data into it. We will use the hly_temp table we created in Chapter 2, for demonstration purposes.

Connect to your cluster via HBase Shell, before you start.

How to do it...

To convert the timestamp of an HBase Shell output into a readable date format:

  1. 1. Enter the following command...

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}