zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Camille Fournier <skami...@gmail.com>
Subject Re: help on Zookeeper code walk through?
Date Sat, 16 Jul 2011 15:46:18 GMT
Check out the SessionTracker and SessionTrackerImpl, that is what the
servers use to keep track of session liveness.

On Sat, Jul 16, 2011 at 4:44 AM, Yang <teddyyyy123@gmail.com> wrote:
> I'm wondering if a client loses session to its ephemeral znode, under
> the hood, how
> is the watcher triggered?
>
> went through the code , and found something that looks related:
> ZKDataBase.killSession()-->DataTree.killSession()--->DataTree.deleteNode()--->WatchManager.triggerWatch()--->Watcher.process()
>
> but how is ZKDataBase.killSession() called?  from the info given in
> http://zookeeper.apache.org/doc/r3.3.3/zookeeperProgrammers.html#ch_zkSessions
>  I can see the ZooKeeper client code does periodically ping the server
> to maintain liveness. but how the server checks for this liveness and
> trigger killSession(), here I'm having difficulty connecting the dots.
>
> could you please give me some help walking through this piece of code?
>
> Thanks
> Yang
>

Mime
View raw message