zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vishal K <vishalm...@gmail.com>
Subject Re: Embedding ZK in another application
Date Thu, 29 Apr 2010 03:22:45 GMT

What is a good way to restart a ZK server (standalone and quorum) without
having to restart it?

Currently, I have ZK server embedded in another java application. The
application is supposed to handle (among other things) start/stop of ZK
server. I am using ZK 3.2.2, but can certainly move to 3.3.0. The
application extends QuorumPeerMain and ZooKeeperServerMain and invokes
initializeAndRun() and shutdown() methods for start and stop, respectively.

The problem is that shutdown() does clean up everything. I still see all the
listener threads active waiting in accept(). Any suggestions how I can
restart without restarting the application? Thanks.

On Sun, Apr 25, 2010 at 2:52 PM, Vishal K <vishalmlst@gmail.com> wrote:

> Hi Mahadev, Ted,
> Thanks for the feedback.
> On Fri, Apr 23, 2010 at 3:02 PM, Ted Dunning <ted.dunning@gmail.com>wrote:
>> It is, of course, your decision, but a key coordination function is to
>> determine whether your application is up or not.  That is very hard to do
>> if
>> Zookeeper is inside your application.
>> On Fri, Apr 23, 2010 at 10:28 AM, Asankha C. Perera <asankha@apache.org
>> >wrote:
>> > However, I believe that both the above are fine to live with for the
>> > application under consideration, as ZK will be used only to coordinate
>> > the larger application. Is there anything else that needs to be
>> > considered - and can I safely shutdown the clientPort since the
>> > application is always in the same JVM - but, if I do that how would I
>> > "connect" to ZK thereafter ?
>> >

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