Search in sources :

Example 11 with ZkNodeExistsException

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();
}
Also used : ZkClient(org.I0Itec.zkclient.ZkClient) ZkNodeExistsException(org.I0Itec.zkclient.exception.ZkNodeExistsException) ZkConnection(org.I0Itec.zkclient.ZkConnection) SamzaException(org.apache.samza.SamzaException) ZkNodeExistsException(org.I0Itec.zkclient.exception.ZkNodeExistsException) Before(org.junit.Before)

Aggregations

ZkNodeExistsException (org.I0Itec.zkclient.exception.ZkNodeExistsException)11 ArbitrateException (com.alibaba.otter.shared.arbitrate.exception.ArbitrateException)7 ZkException (org.I0Itec.zkclient.exception.ZkException)7 ZkNoNodeException (org.I0Itec.zkclient.exception.ZkNoNodeException)5 CanalMetaManagerException (com.alibaba.otter.canal.meta.exception.CanalMetaManagerException)1 CanalClientException (com.alibaba.otter.canal.protocol.exception.CanalClientException)1 MainStemEventData (com.alibaba.otter.shared.arbitrate.model.MainStemEventData)1 ChannelStatus (com.alibaba.otter.shared.common.model.config.channel.ChannelStatus)1 UnsupportedEncodingException (java.io.UnsupportedEncodingException)1 ZkClient (org.I0Itec.zkclient.ZkClient)1 ZkConnection (org.I0Itec.zkclient.ZkConnection)1 ZkInterruptedException (org.I0Itec.zkclient.exception.ZkInterruptedException)1 SamzaException (org.apache.samza.SamzaException)1 Before (org.junit.Before)1