The actual role of Zookeeper in HBase - tenji/ks GitHub Wiki

HBase 与 Zookeeper 那些事

哪些问题利用Zookeeper来解决

Zookeeper 路径的创建与监听表

路径 创建者 监听者 类型 说明
/hbase 永久
/hbase/hbaseid 永久
/hbase/meta-region-server 永久
/hbase/hbaseid 临时
/hbase/rs Region Server 永久
/hbase/unassigned
/hbase/master HMaster 临时 The “active” master will register its own address in this znode at startup, making this znode the source of truth for identifying which server is the Master.
/hbase/backup-masters inactive Master 临时 Each inactive Master will register itself as backup Master by creating a sub-znode (hbase/backup-master/m1.host). This znode is mainly used to track which machines are available to replace the Master in case of failure.
/hbase/table 永久 Used by the master to track the table state during assignments (disabling/enabling states, for example).
/hbase/table-lock 永久
/hbase/splitlog 永久 Used by the log splitter to track the pending log to replay and its assignment.
/hbase/acl 永久 The acl znode is used for synchronizing the changes made to the acl table by the grant/revoke commands. Each table will have a sub-znode (/hbase/acl/tableName) containing the ACLs of the table.
/hbase/tokenauth 永久 The token provider is usually used to allow a MapReduce job to access the HBase cluster. When a user asks for a new token the information will be stored in a sub-znode created for the key (/hbase/tokenauth/keys/key-id).
/hbase/replication 永久 Root znode that contains all HBase replication state information
/hbase/replication/peers 永久 Each peer will have a sub-znode (e.g. /hbase/replication/peers/<ClusterID>) containing the ZK ensemble’s addresses that allows the peer to be contacted.
/hbase/replication/state 永久
/hbase/replication/rs 永久 Contains the list of RegionServers in the main cluster (/hbase/replication/rs/<region server>). And for each RegionServer znode there is one sub-znode per peer to which it is replicating. Inside the peer sub-znode the hlogs are waiting to be replicated (/hbase/replication/rs/<region server>/<ClusterId>/<hlogName>).

参考链接