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

HBase region management


In this section, we will discuss various operations, such as compaction, merging, and splitting, which we can perform on the HBase region.

Compaction

Compaction is done to reduce the number of StoreFiles. Once the number of StoreFiles is reduced, more efficiency and performance can be gained. It is a high-resource-hungry process. Running this will result in a single StoreFile per store. Major compactions also process delete markers and maximum versions.

We already discussed compaction, so we will see how to perform this:

hbase >major_compact

In Java, use HBaseAdmin.majorCompact, which we will look at in Chapter 7, Scripting in HBase, and Chapter 8, Coding HBase in Java.

Note

Read more on compaction in detail at http://hbase.apache.org/book/regions.arch.html#compaction.

Merge

We can use the merge command in adjoining regions in the same table to increase performance:

hbase org.apache.hadoop.hbase.util.Merge <tablename> <region name> <region name>