zookeeper的zoo配置详解
2019-09-26 本文已影响0人
kacen
该篇文章是作为单独的zookeeper的配置详解
# The number of milliseconds of each tick
# 这个是服务器与客户端之间交互的时间单元
tickTime=2000
# The number of ticks that the initial
# synchronization phase can take
# 此配置项是表示允许follower连接并同步到leader的初始化时间,它是以tickTime的倍数来表示.当超过tickTime的倍数时,会导致连接失败.
initLimit=10
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
# leader服务器与follower服务器之间信息同步允许的最大时间间隔,如果超出此间隔时间,默认leader服务器和follower服务器断开连接
syncLimit=5
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just
# example sakes.
# 这两个很明显,一个是数据储存的位置,另一个是日志储存的位置。
dataDir=/usr/local/zookeeper1/data
dataLogDir=/usr/local/zookeeper1/dataLog
# the port at which the clients will connect
clientPort=2181
# the maximum number of client connections.
# increase this if you need to handle more clients
#maxClientCnxns=60
#
# Be sure to read the maintenance section of the
# administrator guide before turning on autopurge.
#
# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
#
# The number of snapshots to retain in dataDir
#autopurge.snapRetainCount=3
# Purge task interval in hours
# Set to "0" to disable auto purge feature
#autopurge.purgeInterval=1
# 这个是server伪集群的配置。
# server.A=B:C:D A表示id(即标志服务器id),B表示ip地址,C表示服务器与集群中leader交换信息的端口,D表示的是当leader失效(宕机等情况),用来选举时服务器通信的端口.
server.1=104.194.84.236:2888:3888
server.2=104.194.84.236:4888:5888
server.3=104.194.84.236:6888:7888