hadoop-zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hanson Char" <hanson.c...@gmail.com>
Subject Missing statement in DataMonitor example ?
Date Wed, 10 Dec 2008 08:19:54 GMT
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

Mime
View raw message