curator-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Keylis <vkeylis2...@gmail.com>
Subject How to create znode with curator
Date Thu, 15 May 2014 21:23:32 GMT
How do you create a path if it does not exist.
CuratorFramework    client =
CuratorFrameworkFactory.newClient("dzoo01:2181/kafka", new
ExponentialBackoffRetry(1000, 3));

path= '/name/offset/event-capture/topic';

I check if path exists
if(curatorFramework.checkExists().forPath(path) == null){
    curatorFramework.create().forPath(path)
}

will that code snippet create znode?


Thanks,
Vadim

Mime
View raw message