zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ariel Weisberg <aweisb...@voltdb.com>
Subject Re: Zookeeper in embedded mode
Date Sat, 28 May 2011 17:41:14 GMT
Hi,

What I did was start a client and wait for it to successfully connect. You can then close
the client or use it.

If there is an init complete message to stdout or log4j you could intercept that.

Regards,
Ariel


On May 28, 2011, at 1:18 PM, Avinash Lakshman <avinash.lakshman@gmail.com> wrote:

> Hi All
> 
> I am trying to run ZK in embedded mode. Basically I invoke
> QuorumPeerMain.main() on a separate thread. However is there a way to
> programmatically determine if the local server is ready to take write
> requests? I would like to on a separate thread create a Zookeeper instance
> and save some state. Currently I have a Thread.sleep(10seconds) to achieve
> what I want.
> 
> Thanks in advance
> Avinash

Mime
View raw message