helix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Gao <k...@box.com>
Subject Listen for ZkStateChanges
Date Thu, 08 Aug 2013 14:26:20 GMT
Hi everyone,

First off, I'm new to the mailing list. My name is Kevin, and I'm working
over at Box. I'm excited to get to work with all of you!

In the mean time, I do have one question regarding detection of ZooKeeper
connection state changes. For our purposes, we need to know the state of
the connection between Helix and ZooKeeper at all times to ensure proper
handling of some failure scenarios. Currently, the model we use for
detecting connectivity is a long poll to the HelixManager.isConnected()
method; however, we would like to ideally be notified of any connection
state changes.

Essentially, I would like to be able to add a ZkStateChangeListener to the
underlying ZkClient, or at least be able to subscribe to such event changes
at the HelixManager level. A mechanism similar to
HelixManager.addCurrentStateChangeListener() would work for example. Am I
missing something obvious, or is this capability just not exposed?

Reasons why we would like to do this include, for example:

* Be able to externally know if a disconnect is due to a flapping issue
* Be able to differentiate between a temporary disconnection vs. a
permanent one, or one of longer duration

Any suggestions?

Thanks a lot,
Kevin

-- 
Kevin Gao
kgao@box.com

Mime
View raw message