hadoop-zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Dunning <ted.dunn...@gmail.com>
Subject Re: A question about Watcher
Date Mon, 16 Aug 2010 16:20:03 GMT
There are two different concepts.  One is connection loss.  Watchers survive
this and the client automatically connects
to another member of the ZK cluster.

The other is session expiration.  Watchers do not survive this.  This
happens when a client does not provide timely
evidence that it is alive and is marked as having disappeared by the
cluster.

On Mon, Aug 16, 2010 at 9:04 AM, Qian Ye <yeqian.zju@gmail.com> wrote:

> Hi all:
>
> Will the watchers of a client be losed when the client disconnects from a
> Zookeeper server? It is said at
>
> http://hadoop.apache.org/zookeeper/docs/current/zookeeperProgrammers.html#ch_zkWatchesthat
> "
> *When a client reconnects, any previously registered watches will be
> reregistered and triggered if needed. In general this all occurs
> transparently.*" It means that we need not to do any extra things about
> watchers if a client disconnected from Zookeeper server A, and reconnect to
> Zookeeper server B, doesn't it? Or I should reregistered all the watchers
> if
> this kind of reconnection happened?
>
> thx~
> --
> With Regards!
>
> Ye, Qian
>

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