zookeeper默认在conf目录下包含一个zoo_sample.cfg示例配置文件,服务实际读取的配置文件则是zoo.cfg
# ZooKeeper使用的基本时间单位(以毫秒为单位)。 它用于做心跳,最小会话超时将是tickTime的两倍。
tickTime=2000
# 是暂停ZooKeeper用于限制仲裁中ZooKeeper服务器连接到领导者的时间长度,是tickTime的倍数
initLimit=10
# 限制服务器与领导者的过期时间,是tickTime的倍数
syncLimit=5
# 存储内存数据库快照的位置,除非另有说明,否则为数据库更新的事务日志。
dataDir=/tmp/zookeeper
# 侦听客户端连接的端口
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