Leader Activation Leader activation includes leader election. We
currently have two leader election algorithms in ZooKeeper:
LeaderElection and FastLeaderElection (AuthFastLeaderElection is a
variant of FastLeaderElection that uses UDP and allows servers to
perform a simple form of authentication to avoid IP spoofing).
ZooKeeper messaging doesn't care about the exact method of electing a
leader has long as the following holds:
The leader has seen the highest zxid of all the followers. A quorum of
servers have committed to following the leader. Of these two
requirements only the first, the highest zxid amoung the followers
needs to hold for correct operation. The second requirement, a quorum
of followers, just needs to hold with high probability. We are going
to recheck the second requirement, so if a failure happens during or
after the leader election and quorum is lost, we will recover by
abandoning leader activation and running another election.
After leader election a single server will be designated as a leader
and start waiting for followers to connect. The rest of the servers
will try to connect to the leader. The leader will sync up with
followers by sending any proposals they are missing, or if a follower
is missing too many proposals, it will send a full snapshot of the
state to the follower.
问题1)动物园管理员领导下台-好问题,除了关闭领队然后把它带回来,我不确定有什么命令可以这样做。在
问题2)领导人选举:在此讨论:
http://zookeeper.apache.org/doc/r3.3.2/zookeeperInternals.html#sc_leaderElection
问题3)检查群集状态-您可以尝试在客户端端口发出4个字母的命令之一,如下所示:
如果一切顺利的话,它会回应伊莫克。在
命令的完整列表:https://zookeeper.apache.org/doc/r3.4.8/zookeeperAdmin.html#sc_zkCommands
或者运行JMX:http://zookeeper.apache.org/doc/r3.3.1/zookeeperJMX.html
相关问题 更多 >
编程相关推荐