Search in sources :

Example 1 with AuditorElector

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();
}
Also used : AuditorElector(org.apache.bookkeeper.replication.AuditorElector) ServerConfiguration(org.apache.bookkeeper.conf.ServerConfiguration)

Aggregations

ServerConfiguration (org.apache.bookkeeper.conf.ServerConfiguration)1 AuditorElector (org.apache.bookkeeper.replication.AuditorElector)1