# The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial
# synchronization phase can take
initLimit=10
#initLimit 配置接受客户端(这里说的客户端不是用户连接Zookeeper 服务器的客户端,而是Zookeeper 服务器集群中连接搭配的Leader的Follower服务器)
#初始化连接时最长能忍受多少个心跳时间间隔数。当已经超过initlimit(默认为10)个心跳的时间(也就是tickTime)长度后)Zookeeper服务器还没有接到客户端的返回消息,那么表明这个客户端连接失败。总的时间长度是 5*2000=10 秒
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
syncLimit=5
#syncLimit 配置与Follower 之间发送消息,请求和应答时间长度,最长不能超过多少个tickTime的时间长度,最长不能超过多少个tickTime的时间长度,总的时间长度是
#总的时间长度就是2*2000=4秒
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just
# example sakes.
dataDir=D:\program\zookeeper\apache-zookeeper-3.6.0-bin\data
dataLogDir=D:\program\zookeeper\apache-zookeeper-3.6.0-bin\log
#根据自己的文件路径进行更改 data ,log文件需要自己在bin目录下进行添加
# 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
#限制到连接Zookeeper的客户端的数量,限制并发连接的数量,他通过ip来区分不同的客户端,此配置可以用来阻止某些类别的dos攻击。将他时候这为0 或者忽略而不进行设置将会取消对并发数连接的限制
#
# 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
# 指定了需要保留的文件数目。默认保留3个
# Purge task interval in hours
# Set to "0" to disable auto purge feature
autopurge.purgeInterval=1
#指定了清理频率,单位是小时,需要填写一个1或者更大的整数,默认为0.表示不开启自己的清理功能
## Metrics Providers
#
# https://prometheus.io Metrics Exporter
#metricsProvider.className=org.apache.zookeeper.metrics.prometheus.PrometheusMetricsProvider
#metricsProvider.httpPort=7000
#metricsProvider.exportJvmInfo=true
···