61. Catalog Tables
The catalog table hbase:meta exists as an HBase table and is filtered out of the HBase shell’s list command,
but is in fact a table just like any other.
61.1. -ROOT-
The -ROOT- table was removed in HBase 0.96.0. Information here should be considered historical.
The -ROOT- table kept track of the location of the .META table (the previous name for the table now called
hbase:meta) prior to HBase 0.96. The -ROOT- table structure was as follows:
Key
.META. region key (.META.,,1)
Values
info:regioninfo (serialized HRegionInfo instance of hbase:meta)
info:server (server:port of the RegionServer holding hbase:meta)
info:serverstartcode (start-time of the RegionServer process holding hbase:meta)
61.2. hbase:meta
The hbase:meta table (previously called .META.) keeps a list of all regions in the system. The location of
hbase:meta was previously tracked within the -ROOT- table, but is now stored in ZooKeeper.
The hbase: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, called info:splitA and
info:splitB. These columns 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.
"Note 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 a region has both an empty start and an empty end key, it is the
only region in the table"
In the (hopefully unlikely) event that programmatic processing of catalog metadata is required, see the
http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/util/Writables.html#getHRegionInfo%28byte%29[Writables] utility.
61.3. Startup Sequencing
First, the location of hbase:meta is looked up in ZooKeeper. Next, hbase:meta is updated with server
and startcode values.
For information on region-RegionServer assignment, see Region-RegionServer Assignment.
HBase -ROOT-表和.META.表
最新推荐文章于 2024-06-22 23:56:55 发布