-
Notifications
You must be signed in to change notification settings - Fork 292
/
zoo.cfg
45 lines (37 loc) · 1.52 KB
/
zoo.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# The number of milliseconds of each tick
# 1.最小时间长度,回话最小超时会依赖此参数 timeout = 2 * tickTime
tickTime=2000
# The number of ticks that the initial
# synchronization phase can take
# 2.Leader节点等待Follower节点并完成数据同步的最长时间单位 initLimit = 10 * tickTime
initLimit=10
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
# 3.心跳检测延时时间 syncLimit = 5 * tickTime
syncLimit=5
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just
# example sakes.
# 4.zookeeper存储mid的data路径 我这里配置的伪集群
dataDir=/opt/soft/data/zookeeper/zookeeper1
# the port at which the clients will connect
# 5.向外提供调用接口的端口号,所有的客户端需要连接到这个端口,才可以拿到数据
clientPort=2181
# 6.配置集群 server.<id> = <ip>:<port1>:<port2> port1是集群心跳,port2是选举端口
server.1=127.0.0.1:2888:3881
server.2=127.0.0.1:2882:3882
server.3=127.0.0.1:2883:3883
# 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