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

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