Üç ZooKeeper sunucusundan oluşan bir ZooKeeper Quorum oluşturuldu.
zoo.cfgAşağıdaki gibi her üç hayvan bakıcısı sunucularının görünüyor bulunan:
maxClientCnxns=50
# The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
syncLimit=5
# the directory where the snapshot is stored.
dataDir=/var/lib/zookeeper
# the port at which the clients will connect
clientPort=2181
server.1=<ip-address-1>:2888:3888
server.2=<ip-address-2>:2888:3888
server.3=<ip-address-3>:2888:3888
analiz
Üç hayvan bakıcısı sunuculardan biri olacağı açıktır Leaderve başkalarını Followers. Eğer Leaderhayvan bakıcısı sunucu kapatma olmuştur Leaderseçim yeniden başlayacak. Amaç başka hayvan bakıcısı sunucusu olacak olmadığını kontrol etmektir Leadereğer Leadersunucu kapatıldı.
Soru
Bir ZooKeeper sunucusunun bir Lider mi yoksa Takipçi mi olduğunu kontrol etmek için hangi komutun verilmesi gerekir?
standalone