Book Image

Learning HBase

By : Shashwat Shriparv
Book Image

Learning HBase

By: Shashwat Shriparv

Overview of this book

Table of Contents (18 chapters)
Learning HBase
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Data model Java operations


There are some operations that can be performed on HBase data; these are known as HBase data model operations. These operations might have tasks such as reading from, writing to, and modifying data into HBase. Now, we will see the following data model operations:

  • Read operations using Get() and Scan()

  • Write operations using Put()

  • Modify operations using Delete()

Read

In this section, we will see the data models that are useful to read data from an HBase table.

Get()

Get() reads a row from a table. It can read a single or a set of rows based on the specified condition. It returns a result that contains data in key-value pairs or a map format. This method is provided by HTable classes and executed as HTable.get (condition). It returns a row specified as a row key or one that's based on a matching filter.

Constructors

Using the following constructors, we can create an object to access the HBase APIs to read the data:

Result get (byte [] RowKey) throws IOException
Result...