首页 > 代码库 > zookeeper相关文档
zookeeper相关文档
主要记录zookeeper的配置文件,遇到的相关问题说明和参考资料
1. # The number of milliseconds of each tick 2. tickTime=2000 3. # The number of ticks that the initial 4. # synchronization phase can take 5. initLimit=10 6. # The number of ticks that can pass between 7. # sending a request and getting an acknowledgement 8. syncLimit=5 9. # the directory where the snapshot is stored. 10. # do not use /tmp for storage, /tmp here is just 11. # example sakes. 12. dataDir=/usr/andy/zookeeper/zookeeper-3.4.8/data 13. dataLogDir=/usr/andy/zookeeper/zookeeper-3.4.8/logs 14. # the port at which the clients will connect 15. clientPort=2181 16. # the maximum number of client connections. 17. # increase this if you need to handle more clients 18. #maxClientCnxns=60 19. # 20. # Be sure to read the maintenance section of the 21. # administrator guide before turning on autopurge. 22. # 23. # http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance 24. # 25. # The number of snapshots to retain in dataDir 26. #autopurge.snapRetainCount=3 27. # Purge task interval in hours 28. # Set to "0" to disable auto purge feature 29. #autopurge.purgeInterval=1
启动命令
./zkServer.sh [start|start-foreground|stop|restart|status|upgrade|print-cmd]
字段说明
1、将conf下的zoo_sample.cfg修改配置为zoo.cfg
2、tickTime:默认2000ms,作为基本单元,用它的配属来表示系统内部的时间间隔配置,比如:
2*tickTime是客户端回话的超时时间
1*tickTime是客户端与zk服务器端的心跳时间
dataDir:用于配置存储快照文件的目录,如果没有配置dataLogDir,事务日志也会存储在该目录【需要配置】,一般创建data文件夹
dataLogDir:事务日志母了路径,一般在zookeeper下创建logs文件夹
clientPort:zk的运行端口,默认2181
参考链接
http://itindex.net/detail/40187-zookeeper-%E7%AE%A1%E7%90%86%E5%91%98-%E7%AE%A1%E7%90%86
http://ssydxa219.iteye.com/blog/2213503
zookeeper相关文档
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。