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 ...

Get HBase Administration Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.