use of org.I0Itec.zkclient.exception.ZkNodeExistsException in project samza by apache.
the class TestZkUtils method testSetup.
@Before
public void testSetup() {
try {
zkClient = new ZkClient(new ZkConnection("127.0.0.1:" + zkServer.getPort(), SESSION_TIMEOUT_MS), CONNECTION_TIMEOUT_MS);
} catch (Exception e) {
Assert.fail("Client connection setup failed. Aborting tests..");
}
try {
zkClient.createPersistent(KEY_BUILDER.getProcessorsPath(), true);
} catch (ZkNodeExistsException e) {
// Do nothing
}
zkUtils = new ZkUtils(KEY_BUILDER, zkClient, SESSION_TIMEOUT_MS);
zkUtils.connect();
}
Aggregations