Hi Hanson, I think that the code is OK in this situation, however the
comment is misleading.
In ZooKeeper version 3 watches are re-registered when the client
reconnects to a server. See this section of the docs:
http://hadoop.apache.org/zookeeper/docs/r3.0.1/zookeeperProgrammers.html#ch_zkWatc
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