hadoop-zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Traverso <mtrave...@gmail.com>
Subject Ordering guarantees for async callbacks vs watchers
Date Thu, 11 Feb 2010 02:59:12 GMT
What are the ordering guarantees for asynchronous callbacks vs watcher
notifications (Java API) when both are used in the same call? E.g.,
for getChildren(final String path, Watcher watcher, ChildrenCallback cb,
Object ctx)

Will the callback always be invoked before the watcher if there is a state
change on the server at about the same time the call is made?

I *think* that's what's implied by the documentation, but I'm not sure I'm
reading it right:

"All completions for asynchronous calls and watcher callbacks will be made
in order, one at a time. The caller can do any processing they wish, but no
other callbacks will be processed during that time." (
http://hadoop.apache.org/zookeeper/docs/r3.2.2/zookeeperProgrammers.html#Java+Binding
)

Thanks!

Martin

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message