9.2. Catalog Tables

The catalog tables -ROOT- and .META. exist as HBase tables. They are filtered out of the HBase shell's list command, but they are in fact tables just like any other.

9.2.1. ROOT

-ROOT- keeps track of where the .META. table is. The -ROOT- table structure is as follows:

Key:

  • .META. region key (.META.,,1)

Values:

  • info:regioninfo (serialized HRegionInfo instance of .META.)
  • info:server (server:port of the RegionServer holding .META.)
  • info:serverstartcode (start-time of the RegionServer process holding .META.)

9.2.2. META

The .META. table keeps a list of all regions in the system. The .META. table structure is as follows:

Key:

  • Region key of the format ([table],[region start key],[region id])

Values:

  • info:regioninfo (serialized HRegionInfo instance for this region)
  • info:server (server:port of the RegionServer containing this region)
  • info:serverstartcode (start-time of the RegionServer process containing this region)

When a table is in the process of splitting two other columns will be created, info:splitA and info:splitB which represent the two daughter regions. The values for these columns are also serialized HRegionInfo instances. After the region has been split eventually this row will be deleted.

Notes on HRegionInfo: the empty key is used to denote table start and table end. A region with an empty start key is the first region in a table. If region has both an empty start and an empty end key, it's the only region in the table

In the (hopefully unlikely) event that programmatic processing of catalog metadata is required, see the Writables utility.

9.2.3. Startup Sequencing

The META location is set in ROOT first. Then META is updated with server and startcode values.

For information on region-RegionServer assignment, see Section 9.7.2, “Region-RegionServer Assignment”.

comments powered by Disqus