O'Reilly logo

HBase: The Definitive Guide, 2nd Edition by Lars George

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3. Client API: The Basics

This chapter will discuss the client APIs provided by HBase. As noted earlier, HBase is written in Java and so is its native API. This does not mean, though, that you must use Java to access HBase. In fact, Chapter 6 will show how you can use other programming languages.

General Notes

Note

As noted in [Link to Come], we are mostly looking at APIs that are flagged as public regarding their audience. See [Link to Come] for details on the annotations in use.

The primary client entry point to HBase is the Table interface in the org.apache.hadoop.hbase.client package. It provides the user with all the functionality needed to store and retrieve data from a HBase table, as well as delete obsolete values and so on. It is retrieved by means of the Connection instance that is the umbilical cord to the HBase cluster. Before looking at the various methods these classes provide, let us address some general aspects of their usage.

All operations that mutate data are guaranteed to be atomic on a per-row basis. This applies to all other concurrent readers and writers of that same row. In other words, it does not matter if another client or thread is reading from or writing to the same row: they either read a consistent last mutation, or may have to wait before being able to apply their edits change.1 More on this in [Link to Come].

Suffice it to say for now that during normal operations and load, a reading client will not be affected by another updating a particular ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required