You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by Mukunda Madhava <mu...@gmail.com> on 2011/02/23 01:48:27 UTC

Watch on multiple z-nodes

Hi,
We need a program which would be watching on multiple z-nodes.

I found an example
http://zookeeper.apache.org/doc/r3.1.1/javaExample.htmlwhere there is
an example to watch on a single z-node.
But if I need to watch multiple z-nodes how do I do it?

Can someone share a sample program on this?

-- 
Thanks,
Mukunda

Re: Watch on multiple z-nodes

Posted by Mahadev Konar <ma...@apache.org>.
Hi mukunda,
 You can not watch multiple zk nodes with a single call to zookeeper.
You can use multiple zk.get(path, true) to watch multiple paths.

hope that helps.

thanks
mahadev

On Tue, Feb 22, 2011 at 4:48 PM, Mukunda Madhava <mu...@gmail.com> wrote:
> Hi,
> We need a program which would be watching on multiple z-nodes.
>
> I found an example
> http://zookeeper.apache.org/doc/r3.1.1/javaExample.htmlwhere there is
> an example to watch on a single z-node.
> But if I need to watch multiple z-nodes how do I do it?
>
> Can someone share a sample program on this?
>
> --
> Thanks,
> Mukunda
>