Class AuditorElector

java.lang.Object
org.apache.bookkeeper.replication.AuditorElector

@StatsDoc(name="auditor", help="Auditor related stats") public class AuditorElector extends Object
Performing auditor election using Apache ZooKeeper. Using ZooKeeper as a coordination service, when a bookie bids for auditor, it creates an ephemeral sequential file (znode) on ZooKeeper and considered as their vote. Vote format is 'V_sequencenumber'. Election will be done by comparing the ephemeral sequential numbers and the bookie which has created the least znode will be elected as Auditor. All the other bookies will be watching on their predecessor znode according to the ephemeral sequence numbers.