Return-Path: X-Original-To: apmail-curator-user-archive@minotaur.apache.org Delivered-To: apmail-curator-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BF1BA178B6 for ; Sun, 26 Oct 2014 22:05:18 +0000 (UTC) Received: (qmail 33323 invoked by uid 500); 26 Oct 2014 22:05:18 -0000 Delivered-To: apmail-curator-user-archive@curator.apache.org Received: (qmail 33287 invoked by uid 500); 26 Oct 2014 22:05:18 -0000 Mailing-List: contact user-help@curator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@curator.apache.org Delivered-To: mailing list user@curator.apache.org Received: (qmail 33277 invoked by uid 99); 26 Oct 2014 22:05:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 26 Oct 2014 22:05:18 +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 (nike.apache.org: domain of ricardojsfer@gmail.com designates 209.85.213.49 as permitted sender) Received: from [209.85.213.49] (HELO mail-yh0-f49.google.com) (209.85.213.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 26 Oct 2014 22:04:52 +0000 Received: by mail-yh0-f49.google.com with SMTP id a41so3842110yho.22 for ; Sun, 26 Oct 2014 15:04:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=FhmOTz/OaTyEY339unAuM2seOI+Xt8dMwXKvPUJdnWo=; b=N/FQZ5QCGwPm7PSyTureCc5oXXowvaLtqiSrRVswA6RH1G+K3thAgRRXxKsfuzl01M KcsjUxZDrJpNWo7myl2iOv8v4j9AQXK6wm2I/1cUgMw82+k+P2ftI3UVCAYmmuDrP0Cv zXi/4MnvEfTsTmWZ64qgrDbIy2KNWZF0n8lToyzm0/5ExEh2g5Wr6X9amj7doBB/tbnK 2/JqFCPKE3e8MsqNA7bzySdL+eHIqo50aDZXeJotOnF0yjFGXznz41cNp1pK5bDKSMyo p8xHDjK0xHzRdAuxNtMhH313rattb+4ynvrL+x8nmdMMdHGkIq6yyk6MsHej16hhMzDn 8oXg== X-Received: by 10.170.82.85 with SMTP id y82mr22162762yky.21.1414361090863; Sun, 26 Oct 2014 15:04:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.170.120.83 with HTTP; Sun, 26 Oct 2014 15:04:30 -0700 (PDT) From: Ricardo Ferreira Date: Sun, 26 Oct 2014 22:04:30 +0000 Message-ID: Subject: Find current group leader To: user@curator.apache.org Content-Type: multipart/alternative; boundary=001a11397ac067b94505065a9abe X-Virus-Checked: Checked by ClamAV on apache.org --001a11397ac067b94505065a9abe Content-Type: text/plain; charset=UTF-8 Hi, I'm using the Leader Election recipe to manage leadership among some of my nodes. However, I need to find out the current leader of these nodes from another client which is not part of the same group. I haven't found anything on the API to do this. So what's done is to instantiate a new LeaderSelector and a dummy LeaderSelectorListener that relinquishes leadership as soon as it gets it (just in case). >From this LeaderSelector I can find the ID of the group leader. Then I'll query ServiceDiscovery for the instance corresponding to this ID. Is there a simpler (or better) way to this? --001a11397ac067b94505065a9abe Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

I'm using the Leader Election r= ecipe to manage leadership among some of my nodes.

However, I need to find out the current leader of these nodes from another= client which is not
part of the same group.

=
I haven't found anything on the API to do this. So what's done= is to instantiate a new LeaderSelector
and a dummy LeaderSelecto= rListener that relinquishes leadership as soon as it gets it (just in case)= .
From this LeaderSelector I can find the ID of the group leader.= Then I'll query ServiceDiscovery for
the instance correspond= ing to this ID.

Is there a simpler (or better) way= to this?
--001a11397ac067b94505065a9abe--