use of org.apache.bookkeeper.replication.AuditorElector in project bookkeeper by apache.
the class TestHttpService method startAuditorElector.
private void startAuditorElector() throws Exception {
auditorZookeeper = ZooKeeperClient.newBuilder().connectString(zkUtil.getZooKeeperConnectString()).sessionTimeoutMs(10000).build();
String addr = bs.get(0).getLocalAddress().toString();
ServerConfiguration conf = TestBKConfiguration.newServerConfiguration();
conf.setAuditorPeriodicBookieCheckInterval(1);
auditorElector = new AuditorElector(addr, conf, auditorZookeeper);
auditorElector.start();
}
Aggregations