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

Versioning and why


As we already discussed version for a record, there is a tuple consisting of {row, column, version} that defines a cell and its value. We can have as many versions as we want, but the number of versions should be decided optimally as it is storage dependent. It means the more versions, the more disk space it requires (it is possible to have an unbounded number of cell versions).

The version is denoted using a long value. The versioned values are stored in descending order so as to keep the most recent value on top. So, when we fetch records, the most recent version is returned.

Let's consider a scenario to version HBase.

Suppose we have an employee database with the employee_history table where we need to keep all the details of a person's previous company. We can enable versioning (increase to whatever number we like to have after a default of 3) and keep all previous and current details of the employee, such as their employment history and scenarios similar to this.

We can...