Return-Path: X-Original-To: apmail-zookeeper-user-archive@www.apache.org Delivered-To: apmail-zookeeper-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6C7C991E1 for ; Mon, 6 Feb 2012 17:28:38 +0000 (UTC) Received: (qmail 35205 invoked by uid 500); 6 Feb 2012 17:28:37 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 35136 invoked by uid 500); 6 Feb 2012 17:28:37 -0000 Mailing-List: contact user-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@zookeeper.apache.org Delivered-To: mailing list user@zookeeper.apache.org Received: (qmail 35120 invoked by uid 99); 6 Feb 2012 17:28:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Feb 2012 17:28:36 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of hartmut.lang@googlemail.com designates 209.85.161.170 as permitted sender) Received: from [209.85.161.170] (HELO mail-gx0-f170.google.com) (209.85.161.170) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Feb 2012 17:28:31 +0000 Received: by ggki2 with SMTP id i2so2823385ggk.15 for ; Mon, 06 Feb 2012 09:28:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=q+rl3M+Cm8W75BLpHiMWXoDy7bqXi0cKsD73wIvW7hc=; b=LhukArleIm0s1FOl0+839lkCKYEvCVbUTaAe5qIHdAYeztHXGwqyov1ghyY0pkyGZX SVpqJAsRshVFoyIGMqEE6HkPj0hJVlkFujQEr9Fusg+tECSlO7MXXQ7XI9dOIUfFcOT5 AoIp+/JP4jOcQLcT0f2kr6uPozevYDXulh1E4= MIME-Version: 1.0 Received: by 10.50.95.166 with SMTP id dl6mr21965879igb.27.1328549290949; Mon, 06 Feb 2012 09:28:10 -0800 (PST) Received: by 10.231.193.159 with HTTP; Mon, 6 Feb 2012 09:28:10 -0800 (PST) In-Reply-To: References: Date: Mon, 6 Feb 2012 18:28:10 +0100 Message-ID: Subject: Re: curator leader reconnect From: Hartmut Lang To: user@zookeeper.apache.org Content-Type: multipart/alternative; boundary=e89a8f3ba0e38dbcc204b84efc7d --e89a8f3ba0e38dbcc204b84efc7d Content-Type: text/plain; charset=ISO-8859-1 Hi Jordan, thanks for your infos. What i see in my LeaderSelector example is this: when i just call the start() method after RECONNECT, the takeLeadership() method is called again. But no ephemeral node does exist in the ZK-Cluster for my client. So this seems not to be right. What could i do wrong? /Hartmut Am 6. Februar 2012 07:55 schrieb Jordan Zimmerman : > No - don't call close. I'm afraid that it's a bit confusing. It was an > afterthought. Maybe I should add a restart() method or something. > > -JZ > > On 2/5/12 10:48 PM, "Hartmut Lang" wrote: > > >Thanks for your answer. > >If i call start() again on the same instance, should i call close() > >before? > > > >My first attempt was to call close() on the LeaderSelector on a > >LOST-Event. > >Well then of course i do not get again the RECONNECT event on the > >LeaderSelectorListener. > > > >/Hartmut > > > >Am 5. Februar 2012 23:53 schrieb Jordan Zimmerman > >: > > > >> You can either create a new LeaderSelector or call start() again on your > >> existing leader instance. Whatever's easier for your use-case. > >> > >> -Jordan > >> > >> On 2/5/12 8:09 AM, "Hartmut Lang" wrote: > >> > >> >Hi, > >> > > >> >i work on a small demo application using the Curator Leader-Election. > >> >What i understand from the wiki is that on a connection LOST-event, the > >> >leader should end his takeLeadership method. > >> > > >> >But what should be done with the LeaderSelector instance? > >> >Should this be also closed on a LOST-event? Or can it be re-used, when > >> >RECONNECTED occurs? > >> >How can the LeaderSelector be restarted on RECONNECTED? > >> > > >> >Hope someone can help, > >> >Hartmut > >> > >> > > --e89a8f3ba0e38dbcc204b84efc7d--