cdh에서 zookeeper를 어떻게 관리하고 zk상태를 보는 명령 요약

참고 데이터 디렉토리가 초기화되지 않으면 ZooKeeper 서버를 시작할 수 없습니다.//운영 환경에서는 ZooKeeper를 여러 개의 서버가 있는 컬렉션으로 배치해야 합니다.ZooKeeper 서비스는 컬렉션에 있는 대부분의 서버만 사용할 수 있습니다.최소 집합 크기는 세 개의 ZooKeeper 서버이며, Cloudera는 각 서버가 단독 컴퓨터에서 실행되는 것을 권장합니다.또한 가능하다면 ZooKeeper 서버 프로세스에 전용 디스크 저장소가 있어야 합니다.
//zk 상태 보기
[root@hadoop-205-107 opt]# echo "stat" |nc 192.168.205.107 2181
Zookeeper version: 3.4.5-cdh5.9.2--1, built on 04/04/2017 08:43 GMT
Clients:
 /192.168.205.107:35132[1](queued=0,recved=424,sent=424)
 /192.168.205.107:45317[0](queued=0,recved=1,sent=0)
 /192.168.205.107:35125[1](queued=0,recved=879,sent=879)
 /192.168.205.107:35227[1](queued=0,recved=6576,sent=6576)
 /192.168.205.107:35133[1](queued=0,recved=449,sent=449)
 /192.168.205.107:35075[1](queued=0,recved=508,sent=510)
 /192.168.205.107:35100[1](queued=0,recved=432,sent=432)
 /192.168.205.107:35083[1](queued=0,recved=2404,sent=2441)

Latency min/avg/max: 0/0/231
Received: 15265
Sent: 15579
Connections: 8
Outstanding: 0
Zxid: 0x7fa
Mode: standalone
Node count: 44
[root@hadoop-205-107 opt]# echo "stat" |nc 192.168.205.107 2181|grep Mode
Mode: standalone

[root@hadoop-205-107 opt]# /opt/cloudera/parcels/CDH-5.9.2-1.cdh5.9.2.p0.3/lib/zookeeper/bin/zkServer.sh status
JMX enabled by default
Using config: /opt/cloudera/parcels/CDH-5.9.2-1.cdh5.9.2.p0.3/lib/zookeeper/bin/../conf/zoo.cfg
Mode: standalone

[root@hadoop-205-107 opt]# telnet 192.168.205.107 2181
Trying 192.168.205.107...
Connected to 192.168.205.107.
Escape character is '^]'.
stat   // 
Zookeeper version: 3.4.5-cdh5.9.2--1, built on 04/04/2017 08:43 GMT
Clients:
 /192.168.205.107:35132[1](queued=0,recved=445,sent=445)
 /192.168.205.107:35125[1](queued=0,recved=912,sent=912)
 /192.168.205.107:35227[1](queued=0,recved=7233,sent=7233)
 /192.168.205.107:35133[1](queued=0,recved=470,sent=470)
 /192.168.205.107:45868[0](queued=0,recved=1,sent=0)
 /192.168.205.107:35075[1](queued=0,recved=529,sent=531)
 /192.168.205.107:35100[1](queued=0,recved=453,sent=453)
 /192.168.205.107:35083[1](queued=0,recved=2447,sent=2484)

Latency min/avg/max: 0/0/231
Received: 16267
Sent: 16595
Connections: 8
Outstanding: 0
Zxid: 0x855
Mode: standalone
Node count: 44
Connection closed by foreign host.

참조 링크:https://www.cloudera.com/documentation/enterprise/5-13-x/topics/cm_mc_zookeeper_service.html#xd_583c10bfdbd326ba--6eed2fb8-14349d04bee--7f1a

좋은 웹페이지 즐겨찾기