The previous recipe introduced the command-line interface for HBase. This recipe demonstrates how we can use the Java API to interact with HBase.
This recipe requires an Apache HBase installation integrated with a Hadoop YARN cluster. Make sure to start all the configured HBase Master and RegionServer processes before we begin.
The following step executes an HBase Java client to store and retrieve data from an HBase table.
HBaseClient Java program by running the following command from the
chapter 7 folder of the sample source repository:
$ gradle execute HBaseClient
The source code for the preceding Java program is available in the