Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Zookeeper >> mail # user >> Watching children updates


Copy link to this message
-
Re: Watching children updates
Thanks, the JIRA is very interesting.

I am contemplating the possibility to make a parent.setData(..) call to
notify of a change in one of the children and put a watcher on
parent.getData().
I would then iterate through the children and compare the stat.getVersion()
to figure out which have changed.
On Wed, Jul 17, 2013 at 5:30 PM, Flavio Junqueira <[EMAIL PROTECTED]>wrote:

> Hi Ben,
>
> Your description seems right to me, assuming that when you refer to
> changes to the children, you mean setting the data of the children.
>
> You may also want to have a look here if you haven't done it yet:
>
>
> http://zookeeper.apache.org/doc/r3.4.5/zookeeperProgrammers.html#ch_zkWatches
>
> About performance impact, you may want to have a look at the discussion
> here:
>
>         https://issues.apache.org/jira/browse/ZOOKEEPER-1177
>
> -Flavio
>
> On Jul 18, 2013, at 12:25 AM, Benjamin Jaton <[EMAIL PROTECTED]>
> wrote:
>
> > Hello,
> >
> > I would like to be notified of a change on any of the children of a znode
> > (could be a lot of them).
> >
> > AFAIK to achieve this we need to set a watcher on each child and then
> also
> > watch the parent to be aware of children addition/deletion and add/remove
> > watchers accordingly. Is that correct?
> >
> > What is the performance impact of having for example thousands of
> watchers?
> >
> > Thanks,
> > Ben
>
>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB