zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Gius <mgius7...@gmail.com>
Subject Re: Forcing DISCONNECTED event?
Date Thu, 15 Mar 2012 06:56:31 GMT
With the python client (thin wrapper around C) I was able to simulate
CONNECTING in a single node scenario.  Just shutdown the only zookeeper
server and the client will notice this real quick.  Turn zookeeper server
back on and client should reconnect within a few seconds.  You'll need to
make sure your recv_timeout is high enough so that the client doesn't give
up and fire a DISCONNECTED.


On Wed, Mar 14, 2012 at 11:06 PM, Patrick Hunt <phunt@apache.org> wrote:

> This is the c client? (In java I know we have a zk subclass that
> provides this.) You can use jmx on the server, there is a
> terminateConnection method. Perhaps an easier way would be to simulate
> Server failure -  e.g. start a quroum of 3 servers, Have your client
> connect, then shutdown the server that the client connected to. The
> client will be disconnected and reconnect to one of the remaining 2
> servers. Our zk tests do this.
> Patrick
> On Wed, Mar 14, 2012 at 11:04 AM, JL <julio.lopez@lycos.com> wrote:
> > Is there a way of forcing the ZK client to go into CONNECTING state
> after having reached the CONNECTED state, but without killing the session?
> > We are aware of the FAQ entry for "Is there an easy way to expire a
> session for testing?", but that does not achieve what we want as it kills
> the session.
> >
> > We'd like to be able to essentially test the sequence of going:
> >
> > - followed by a transition from CONNECTING to CONNECTED.
> >
> > Thanks,
> >
> > -Julio

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