I'm currently in the early stages of development to integrate Zookeeper stuff into my app. I'm using Netflix's Curator as an API for dealing with Zookeeper. I get the gist of most of it (like adding ZNodes and whatnot).
But how the heck do you check if a ZNode exists? The code that seems like it would work is:
client.checkExists().forPath(path);
...Where client
is an instance of com.netflix.curator.framework.CuratorFramework
However, this call returns a org.apache.zookeeper.data.Stat
object.
Using this object, how can I tell if a path exists or not?
Thanks