随笔分类 - ZooKeeper
摘要:package CreateGroup;import java.io.IOException;import java.util.List;import java.util.concurrent.CountDownLatch;import org.apache.zookeeper.AsyncCallb...
阅读全文
摘要:3 常用命令3.1. 启动ZK服务: bin/zkServer.sh start3.2. 查看ZK服务状态: bin/zkServer.sh status3.3 停止ZK服务: bin/zkServer.sh stop3.4. 重启ZK服务: bin/zkServer.sh restart 3.5 ...
阅读全文
摘要:Watcher设置是开发中最常见的,需要搞清楚watcher的一些基本特征,对于exists、getdata、getchild对于节点的不同操 作会收到不同的watcher信息。对父节点的变更以及孙节点的变更都不会触发watcher,而对watcher本身节点以及子节点的变更会触发 watcher,...
阅读全文