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>
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.12.107.31