Return-Path: Delivered-To: apmail-hadoop-zookeeper-user-archive@minotaur.apache.org Received: (qmail 18547 invoked from network); 29 Apr 2010 14:14:26 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 29 Apr 2010 14:14:26 -0000 Received: (qmail 35442 invoked by uid 500); 29 Apr 2010 14:14:24 -0000 Delivered-To: apmail-hadoop-zookeeper-user-archive@hadoop.apache.org Received: (qmail 34965 invoked by uid 500); 29 Apr 2010 14:14:24 -0000 Mailing-List: contact zookeeper-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: zookeeper-user@hadoop.apache.org Delivered-To: mailing list zookeeper-user@hadoop.apache.org Received: (qmail 34739 invoked by uid 99); 29 Apr 2010 14:14:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Apr 2010 14:14:23 +0000 X-ASF-Spam-Status: No, hits=2.1 required=10.0 tests=AWL,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of vishalmlst@gmail.com designates 209.85.212.48 as permitted sender) Received: from [209.85.212.48] (HELO mail-vw0-f48.google.com) (209.85.212.48) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Apr 2010 14:14:18 +0000 Received: by vws13 with SMTP id 13so901933vws.35 for ; Thu, 29 Apr 2010 07:13:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=oGDaM/V7Vzj7axvAn4JGb9JSIa8QzY6K4mCVwZ5UiqI=; b=KfZku1ZGP03vYR8bQ1DdzNXunOiJ5q5C7MM4gM5ek4cdRAU5FOmzSk83dEMLVfHhEW M2MXlbWZ5VOt+jMLRYDQ/SBRjF3tdwzusI77UN3IW3iYA2MFsI96Q4OR79G2Glg2B/ek gS8UXhFQH/O0TaISPBZT4d9ilXLgTs7DMoy40= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=ndgGi/m4quzHZeHOfXukBRG5hIrqKA7IkjTDDBxDuwcFsoJk1vytOsxWHdUP/9GrrN wW/9G7OYK5ZHLWEtLBDUjSqRFZkePOzdJSFV/LNHdRLnTLNu3VwvbeXY7TxPzH5qs0Kr EInvFUiQfdnXBRK6K8R2Ch0hoiZjhHHHJKMyQ= MIME-Version: 1.0 Received: by 10.224.79.75 with SMTP id o11mr259691qak.195.1272550436176; Thu, 29 Apr 2010 07:13:56 -0700 (PDT) Received: by 10.224.80.198 with HTTP; Thu, 29 Apr 2010 07:13:56 -0700 (PDT) In-Reply-To: References: <4BD1D8C9.3020308@apache.org> Date: Thu, 29 Apr 2010 10:13:56 -0400 Message-ID: Subject: Re: Embedding ZK in another application From: Vishal K To: zookeeper-user@hadoop.apache.org Content-Type: multipart/alternative; boundary=001636137500b50619048560bca4 --001636137500b50619048560bca4 Content-Type: text/plain; charset=ISO-8859-1 Hi Ted, We want the application that embeds the ZK server to be running even after the ZK server is shutdown. So we don't want to restart the application. Also, we prefer not to use zkServer.sh/zkServer.cmd because these are OS dependent (our application will run on Win as well as Linux). Instead, we thought that calling QuorumPeerMain.initializeAndRun() and QuorumPeerMain.shutdown() will suffice to start and shutdown a ZK server and we won't have to worry about checking the OS. Is there way to cleanly shutdown the ZK server (by invoking ZK server API) when it is embedded in the application without actually restarting the application process? Thanks. On Thu, Apr 29, 2010 at 1:54 AM, Ted Dunning wrote: > Hmmm.... it isn't quite clear what you mean by restart without restarting. > > Why is killing the server and restarting it not an option? > > It is common to do a rolling restart on a ZK cluster. Just restart one > server at a time. This is often used during system upgrades. > > On Wed, Apr 28, 2010 at 8:22 PM, Vishal K wrote: > > > > > 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. > --001636137500b50619048560bca4--