zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Javier Vegas <jav...@beboinc.com>
Subject NodeChildrenChanged WatchedEvent
Date Fri, 08 May 2009 19:11:19 GMT
Hi, I am starting to implement Zookeeper as an arbiter for a high
performance client-server service, it is working really well but I
have a question. When my Watcher receives an event of
NodeChildrenChanged event, is there any way of getting from the event
the path for the child that changed? The WatchedEvent javadoc says
that it "includes exactly what happened" but all I am able to extract
is a vague "NodeChildrenChanged" type. What I am doing now to figure
out the path of teh new child is to do a new getChildren and compare
the new children list with the old children list, but that seems a
waste of time and bandwith if my node has lots of children and is
watched by a loot of zookeepers (which will be in prod). If I can
somehow get the path of the added/deleted child from the
WatchedEvent, it will make my life easier and my Zookeeper-powered
system much more simple, robust and scalable. Any suggestions?


Javier Vegas

View raw message