In the explanation of the Java binding, it is mentioned "If the file (or
znode) exists, it gets the data from the znode, and then invoke the exists()
callback of Executor if the state has changed. Note, it doesn't have to do
any Exception processing for the getData call because it has watches pending
for anything that could cause an error: if the node is deleted before it
calls ZooKeeper.getData(), the watch event set by the
ZooKeeper.exists()triggers a callback.... "
I read this to mean that if I insert a Thread.sleep() before the getData
call & removed the node from the cli, somehow (magically) there would be no
error. But of course, it does not happen....
Sleeps for 10 seconds
org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode =
NoNode for /zk_test
Am I doing something wrong (or reading something wrong)?