zookeeper的zoo_sample.cfg配置文件配置说明

# The number of milliseconds of each tick

#单位为毫秒,zookeeper每到tickTime会向注册的服务器和slave发送一次心跳检测,也是zookeeper配置中的最小时间单位,其他配置会引用此配置

tickTime=2000

 

# The number of ticks that the initial synchronization phase can take

#slave在启动时,将首先从master同步数据,然后对外提供服务。如果slave没能在(initLimit*tickTime)的时间内完成这一动作,那么master就认为这个slave启动失败

initLimit=10

 

# The number of ticks that can pass between sending a request and getting an acknowledgement

#master和slave在进行通讯时,请求和应答的时间总和,如果超过(syncLimit*tickTime),则认为此次通讯失败,该slave不能正常提供服务,将停用此slave,所有指向此slave的客户端将分配给其他服务。

syncLimit=5 

 

# the directory where the snapshot is stored.do not use /tmp for storage, /tmp here is just example sakes.

#zookeeper存储快照文件的默认目录,日志文件也将存在此目录下

dataDir=/tmp/zookeeper

 

# the port at which the clients will connect

#clientPort是客户端连接zookeeper服务器的端口,zookeeper会监听这个端口接受客户端的访问请求

clientPort=2181

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章