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 <[email protected]> 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
