简体   繁体   English

如何清理Zookeeper集群配置?

[英]How to clean up Zookeeper cluster configuration?

I set up zookeeper cluster with 3 nodes successfully. 我成功设置了具有3个节点的zookeeper集群。 How can I clean up existing cluster configuration and how to do these nodes like a standalone? 如何清理现有的群集配置,以及如何像独立服务器一样处理这些节点?

Found way: 找到方式:

1) need to edit zoo.cfg config file, particularly comment setting servers part: 1)需要编辑zoo.cfg配置文件,特别是注释设置服务器部分:

dataDir=/var/zookeeper
clientPort=2181
tickTime=2000
initLimit=5
syncLimit=2
#server.1=zookeeper1:2888:3888
#server.2=zookeeper2:2888:3888
#server.3=zookeeper3:2888:3888

2) remove snaps in data dir in my case is: 2)在我的情况下,删除数据目录中的快照是:

rm -rf /var/zookeeper/version-2/*

3) restart zookeeper server: 3)重启zookeeper服务器:

zkServer.sh restart

Need to execute on each node. 需要在每个节点上执行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM