HBase was written in Java and provides a robust Java API. This article demonstrates how to use that API to interact with HBase from a Java application. The API follows the same model that we saw in the shell in the last application: Insertions and updates are performed with a Put object, retrievals are performed with a Get object, deletions are performed with a Delete object, and finally table scans are performed with a Scan object. The only challenge that we had to face was to ensure that all the Strings that we used in the shell were converted into byte arrays.
Now that we know how to insert data into HBase, the next article, “HBase Analysis with MapReduce,” will demonstrate how to analyze that data using MapReduce.