zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ankur C. Goel" <gan...@yahoo-inc.com>
Subject Re: zookeeper discussion on watches.
Date Tue, 21 Aug 2012 20:22:09 GMT
In addition to what Sunil said, you might also want to take a look at
Curator (https://github.com/Netflix/curator/wiki) which is wrapper library
over zookeeper. It exposes modern APIs, has very nice features and all the
zookeeper recipes OOB.


On 8/21/12 2:31 AM, "Harsh J" <harsh@cloudera.com> wrote:

>Hi Sunil,
>Have you gone over the developer's guide docs on the website:
>It is pretty simple to use watches and the text on that page should
>almost be all you need to use it.
>Also, the zkCli.sh CLI program does show how to set a watch when you
>type "help" on it:
>> get path [watch]
>So for example, if you want to set a watch from the CLI on the znode
>/hbase/master, you may do:
>> get /hbase/master true
>(The new CLI format on trunk is to do as "get -w /hbase/master"
>instead. But the above should work and warn even if you are on trunk
>Then if "printwatches" is on (it is on by default), you should be able
>to see any changes made to that znode by other processes.
>For instance, if I deleted the node via a "delete /hbase/master", I'd
>see this on the shell:
>WatchedEvent state:SyncConnected type:NodeDeleted path:/hbase/hbaseid
>Hope this helps!
>On Tue, Aug 21, 2012 at 1:19 PM, sunil singh <sunilsingh0032@yahoo.com>
>> Hi guys... m working on zookeeper and its really difficult to find
>> precise on watches.
>> So lets start on discussion on watches from beginning so that all the
>> developer around the world get help and share their experience.
>> Q.1) how to set watch on a znode so that clients are notified when the
>> of the znode changes.
>> --
>> View this message in context:
>> Sent from the zookeeper-user mailing list archive at Nabble.com.
>Harsh J

View raw message