HBase与Zookeeper数据结构查询

时间:2023-03-08 23:38:17
HBase与Zookeeper数据结构查询

一、前言

 最近一年了吧,总是忙于特定项目的业务分析和顶层设计,很少花时间和精力放到具体的技术细节,感觉除了架构理念和分析能力的提升,在具体技术层次却并没有多大的进步。因为一些原因,总被人问及一些技术细节,很多细节都模糊了,花点时间,温习一下吧。技术部分将作为下一个阶段的工作重点。 

二、操作说明

查看Zookeeper内部HBase相关数据,有两个主要的渠道:一、通过Hbase shell命令zk_dump查看;二、通过zk_cli.sh查看;

三、zk_dump

 HBase is rooted at /hbase
Active master address: localhost,,
Backup master addresses:
Region server holding hbase:meta: localhost,,
Region servers:
localhost,,
/hbase/replication:
/hbase/replication/peers:
/hbase/replication/rs:
/hbase/replication/rs/localhost,,:
Quorum Server Statistics:
192.168.230.128:
Zookeeper version: 3.4.-, built on // : GMT
Clients:
/192.168.230.128:[](queued=,recved=,sent=)
/192.168.230.128:[](queued=,recved=,sent=)
/192.168.230.128:[](queued=,recved=,sent=)
/192.168.230.128:[](queued=,recved=,sent=)
/192.168.230.128:[](queued=,recved=,sent=)
/192.168.230.128:[](queued=,recved=,sent=)
/192.168.230.128:[](queued=,recved=,sent=)
/192.168.230.128:[](queued=,recved=,sent=)
/192.168.230.128:[](queued=,recved=,sent=)
/192.168.230.128:[](queued=,recved=,sent=) Latency min/avg/max: //
Received:
Sent:
Connections:
Outstanding:
Zxid: 0x65
Mode: standalone
Node count:

四、zk_cli.sh

 [zk: 192.168.230.128:(CONNECTED) ] ls
ZooKeeper -server host:port cmd args
connect host:port
get path [watch]
ls path [watch]
set path data [version]
rmr path
delquota [-n|-b] path
quit
printwatches on|off
create [-s] [-e] path data acl
stat path [watch]
close
ls2 path [watch]
history
listquota path
setAcl path acl
getAcl path
sync path
redo cmdno
addauth scheme auth
delete path [version]
setquota -n|-b val path
[zk: 192.168.230.128:(CONNECTED) ] ls /
[hbase, zookeeper]
[zk: 192.168.230.128:(CONNECTED) ] ls /hbase
[meta-region-server, backup-masters, table, draining, region-in-transition, table-lock, running, master, namespace, hbaseid, online-snapshot, replication, splitWAL, recovering-regions, rs]
[zk: 192.168.230.128:(CONNECTED) ]

五、说明

  关于输出结果的解读,就不去细说了,感兴趣的兄弟,自己去问度娘吧。

  莫愁前路无知己,夜漫自有早行人。大数据架构师技术交流: 347018601