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 types


Let's have a look at the data types available in HBase. In HBase, everything is a byte. It is a byte in and a byte out, which means everything that has to be written in HBase needs to be converted/encoded to a byte array, and while reading, it can again be converted/decoded to an equivalent representation. This facility is provided by the put and result interfaces. So, no matter what the type of data is, as long as it can be converted to a byte array, it can be stored in an HBase table. The input data type might be an integer, image, or object, or a long or string. All of these can be converted to a byte array and stored in an HBase table.

Since we can store any type of data, it does not imply that we can convert and store huge amounts of data into an HBase cell as there is a practical limit; more than 20 MB is a big thing to ask for. So, it's better that we choose smaller data that can be converted and stored in an HBase cell, and for huge amounts of data, we can choose other...