HBase -ROOT-表和.META.表

官方文档:http://hbase.apache.org/book.html#arch.catalog


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.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值