I wonder if there is a missing statement (bug?) in the example:
http://hadoop.apache.org/zookeeper/docs/r3.0.1/javaExample.html#sc_DataMonitor
public void process(WatchedEvent event) {
...
case SyncConnected:
// Everything is happy. Lets kick things off
// again by checking the existence of the znode
break;
...
According to the comment, shouldn't ZooKeeper.exists be invoked ? Like so:
case SyncConnected:
// Everything is happy. Lets kick things off
// again by checking the existence of the znode
zk.exists(znode, true, this, null);
break;
Or am I missing something ?
Regards,
Hanson