码迷,mamicode.com
首页 > 其他好文 > 详细

zookeeper相关文档

时间:2017-02-24 10:52:21      阅读:140      评论:0      收藏:0      [点我收藏+]

标签:disable   回话   命令   nan   zoo.cfg   connect   data   director   没有   

主要记录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相关文档

标签:disable   回话   命令   nan   zoo.cfg   connect   data   director   没有   

原文地址:http://www.cnblogs.com/buywine/p/6437344.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!