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.
-ROOT- keeps track of where the .META. table is. The -ROOT- table structure is as follows:
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.)
The .META. table keeps a list of all regions in the system. The .META. table structure is as follows:
[table],[region start key],[region id])
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,
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.
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”.