Chapter 18. HBCK and Inconsistencies

HBase Filesystem Layout

Like any database or filesystem, HBase can run into inconsistencies between what it believes its metadata looks like and what its filesystem actually looks like. Of course, the inverse of the previous statement can be true as well. Before getting into debugging HBase inconsistencies, it is important to understand the layout of HBase’s metadata master table known as hbase:meta and the how HBase is laid out on HDFS. Looking at the meta table name hbase:meta, the hbase before the : indicates the namespace the table lives in, and after the : is the name of the table, which is meta. Namespaces are used for logical grouping of similar tables, typically utilized in multitenant environments. Out of the box, two namespaces are used: default and hbase. default is where all tables without a namespace specified are created, and hbase is used for HBase internal tables. For right now, we are going to focus on hbase:meta. HBase’s meta table is used to store important pieces of information about the regions in the HBase tables. Here is a sample output of an HBase instance with one user table named odell:

hbase(main):002:0> describe 'hbase:meta' DESCRIPTION 'hbase:meta', {TABLE_ATTRIBUTES => {IS_META => 'true', coprocessor$1 => '|org.apache.hadoop.hbase.coprocessor.MultiRowMutation Endpoint|536870911|'}, {NAME => 'info', DATA_BLOCK_ENCODING => 'NONE', BLOOMFILTER => 'NONE', REPLICATION_SCOPE => '0', COMPRESSION => 'NONE', VERSIONS ...

Get Architecting HBase Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.