On Wed, Feb 2, 2011 at 7:24 PM, Ride Shoot Speak <[email protected]> wrote: > Hi ZooKeepers, > > I'd like to get some information about the the states ZOO_CONNECTING_STATE > and ZOO_ASSOCIATING_STATE and how to handle them appropriately. I can't seem > to find any information about those states. Right now I simply drop the > connection if my callback is called with these states. > > TIA > Jan
Hi Jan, I would normally refer you to the state diagram of the ZooKeeper states, but it seems not to be working ( http://wiki.apache.org/hadoop/ZooKeeper/FAQ#A1 ) ZOO_CONNECTING_STATE : This is when you try to send a request to the ZooKeeper server, when the client library is still actively connecting to a server (Session establishment is asynchronous). Requests will be queued. If the connection attempt fails, any requests fail with CONNECTION_LOSS ZOO_ASSOCIATING_STATE : I believe the handshake between the client and the server is still in progress, also part of the connection process. I only handle ZOO_EXPIRED_SESSION_STATE (need to explicitly make a new zookeeper connection) and ZOO_CONNECTED_STATE (client library is ready to be used) explicitly in my client code (I don't use authentication so can ignore ZOO_AUTH_FAILED_STATE) -- Thijs Terlouw, Shenzhen, China http://www.startinchina.com
