HBase与Zookeeper数据结构查询
一、前言最近一年了吧,总是忙于特定项目的业务分析和顶层设计,很少花时间和精力放到具体的技术细节,感觉除了架构理念和分析能力的提升,在具体技术层次却并没有多大的进步。因为一些原因,总被人问及一些技术细节,很多细节都模糊了,花点时间,温习一下吧。技术部分将作为下一个阶段的工作重点。
二、操作说明
查看Zookeeper内部HBase相关数据,有两个主要的渠道:一、通过Hbase shell命令zk_dump查看;二、通过zk_cli.sh查看;
三、zk_dump
1 HBase is rooted at /hbase
2 Active master address: localhost,60000,1411261739960
3 Backup master addresses:
4 Region server holding hbase:meta: localhost,60020,1411261739301
5 Region servers:
6localhost,60020,1411261739301
7 /hbase/replication:
8 /hbase/replication/peers:
9 /hbase/replication/rs:
10 /hbase/replication/rs/localhost,60020,1411261739301:
11 Quorum Server Statistics:
12192.168.230.128:2181
13 Zookeeper version: 3.4.6-1569965, built on 02/20/2014 09:09 GMT
14 Clients:
15 /192.168.230.128:54264(queued=0,recved=204,sent=212)
16 /192.168.230.128:54269(queued=0,recved=113,sent=113)
17 /192.168.230.128:54265(queued=0,recved=460,sent=507)
18 /192.168.230.128:54271(queued=0,recved=131,sent=131)
19 /192.168.230.128:54274(queued=0,recved=86,sent=86)
20 /192.168.230.128:54656(queued=0,recved=12,sent=12)
21 /192.168.230.128:54654(queued=0,recved=3,sent=3)
22 /192.168.230.128:54270(queued=0,recved=94,sent=94)
23 /192.168.230.128:54481(queued=0,recved=242,sent=242)
24 /192.168.230.128:54657(queued=0,recved=1,sent=0)
25
26 Latency min/avg/max: 0/1/155
27 Received: 1352
28 Sent: 1406
29 Connections: 10
30 Outstanding: 0
31 Zxid: 0x65
32 Mode: standalone
33 Node count: 38
四、zk_cli.sh
1 ls
2 ZooKeeper -server host:port cmd args
3 connect host:port
4 get path
5 ls path
6 set path data
7 rmr path
8 delquota [-n|-b] path
9 quit
10 printwatches on|off
11 create [-s] [-e] path data acl
12 stat path
13 close
14 ls2 path
15 history
16 listquota path
17 setAcl path acl
18 getAcl path
19 sync path
20 redo cmdno
21 addauth scheme auth
22 delete path
23 setquota -n|-b val path
24 ls /
25
26 ls /hbase
27
28
五、说明
关于输出结果的解读,就不去细说了,感兴趣的兄弟,自己去问度娘吧。
莫愁前路无知己,夜漫自有早行人。大数据架构师技术交流: 347018601
页:
[1]