Return-Path: X-Original-To: apmail-helix-user-archive@minotaur.apache.org Delivered-To: apmail-helix-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 A5C8018C80 for ; Mon, 7 Dec 2015 23:57:02 +0000 (UTC) Received: (qmail 79324 invoked by uid 500); 7 Dec 2015 23:57:02 -0000 Delivered-To: apmail-helix-user-archive@helix.apache.org Received: (qmail 79271 invoked by uid 500); 7 Dec 2015 23:57:02 -0000 Mailing-List: contact user-help@helix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@helix.apache.org Delivered-To: mailing list user@helix.apache.org Received: (qmail 79260 invoked by uid 99); 7 Dec 2015 23:57:02 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Dec 2015 23:57:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 984D9C28D2 for ; Mon, 7 Dec 2015 23:57:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.149 X-Spam-Level: *** X-Spam-Status: No, score=3.149 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 7EEqoeT93Osf for ; Mon, 7 Dec 2015 23:56:54 +0000 (UTC) Received: from mail-vk0-f43.google.com (mail-vk0-f43.google.com [209.85.213.43]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 03FE942B4B for ; Mon, 7 Dec 2015 23:56:54 +0000 (UTC) Received: by vkbs1 with SMTP id s1so2164804vkb.1 for ; Mon, 07 Dec 2015 15:56:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=xWLmeb8FLBkf/hxdr/MZYMoFNnoZuCePsI5tyXucje0=; b=jQ3lC9ntpRl5Iaqz6JLiVszjr9SuCUAkVTu5cwFJgezUBwE+SwUjehlOZFelVuHwIX RyQ3mHW/r3PYarpuJrQiwVtMqFzCpe9Z4VJy4XEkcL18TRkj6bxNCeYPc1nvIF+sUe+K ktsrnieCLfPhg41MzXB5lSNrlnn10yj8Dgi1bye9Mf8E83wr2SK3hMm4Htvi1U1Yu+32 sSLowY/qlMW5s3HESVIL9agFj+K9fpQCtF6+kAlt3uCJfgMraX66zXTm4giQszXL7YUD NSfvt6id1ixxGF8VqZCEKqj2xPX0ipMLkQAyAt0YoVnPmHQUESM0EABDYAycE6Thofps E/BA== X-Received: by 10.31.139.84 with SMTP id n81mr508229vkd.78.1449532613246; Mon, 07 Dec 2015 15:56:53 -0800 (PST) MIME-Version: 1.0 Received: by 10.31.58.13 with HTTP; Mon, 7 Dec 2015 15:56:33 -0800 (PST) In-Reply-To: References: From: Hang Qi Date: Mon, 7 Dec 2015 15:56:33 -0800 Message-ID: Subject: Re: Is there any way to force controller to re-elect leader To: user@helix.apache.org Content-Type: multipart/alternative; boundary=001a114505fe80c3ae0526579c38 --001a114505fe80c3ae0526579c38 Content-Type: text/plain; charset=UTF-8 Hi Kishore, Thanks very much for your detailed instructions, I tried it on my test cluster, it works! Thanks Hang Qi On Wed, Dec 2, 2015 at 12:54 PM, kishore g wrote: > Here are the steps. Please try them on a dummy cluster > > Lets call the existing cluster - ServingCluster. First we create a new > cluster called SuperCluster > > helix-admin.sh createCluster SuperCluster > > Now add controller nodes C1, C2, C3 as participants to SuperCluster > > helix-admin.sh addInstance SuperCluster C1 > helix-admin.sh addInstance SuperCluster C2 > helix-admin.sh addInstance SuperCluster C3 > > Add a resource named after original cluster, ServingCluster. This resource > can be set up in any mode. > > AUTO ---> one of C1, C2, C3 will start managing ServingCluster > SEMI_AUTO - leader is selected based on the preference list. If you want > C2 to be the leader, set it to C2, C3, C1. If C2 crashes, C3 will take over > automatically. > CUSTOM- > you get complete control here, if you want to C2 to control the > ServingCluster, set the IS as follows. Note: there is not automatic > re-election of leader in this case. > > C1:STANDBY, > C2:LEADER, > C3:STANDBY > > Stop all controllers. Restart them in distributed mode, and this time the > cluster name you provide to start will be SuperCluster. > > Hope this helps. > > Once you test your changes, you can go back to standalone mode by simply > restarting the controllers again in standalone mode and provide the > ServingCluster as the clustername. > > Hope this helps. > > Try this out on a dummy cluster. > > thanks, > Kishore G > > > On Wed, Dec 2, 2015 at 12:07 PM, Hang Qi wrote: > >> Hi Kishore, >> >> Thanks very much for your response. >> >> We are using Standalone mode. >> >> Do you have any instructions how to convert controllers from standalone >> to distributed mode, I can not find it in >> http://helix.apache.org/0.6.5-docs/tutorial_controller.html >> >> Thanks >> Hang Qi >> >> On Wed, Dec 2, 2015 at 11:55 AM, kishore g wrote: >> >>> What is the mode in which controller is deployed? >>> >>> Standalone or Distributed. >>> >>> Standalone is the mode where we run 3 controllers independently and one >>> of them becomes the leader and starts managing. >>> >>> In Distributed, the controllers are participant of another super cluster >>> and cluster to manage will become a resource in the super cluster. This >>> mode is useful when there are too many clusters and we dont need to bring >>> up controllers for each cluster. >>> >>> What you want can be achieved easily with distributed mode. You can >>> enable/disable controllers since they come participants of super cluster. >>> >>> I cant think of a straight forward way to achieve that in standalone >>> mode. >>> >>> Another option is to convert controllers from standalone to distributed. >>> This can be done without causing any interruption to running servers. >>> >>> >>> On Wed, Dec 2, 2015 at 11:16 AM, Hang Qi wrote: >>> >>>> Hi All, >>>> >>>> Is there any way to force controller to re-elect leader, or one step >>>> further, is there any way we can force particular controller to be the >>>> leader? >>>> >>>> The reason I am asking is that we are using customized rebalancer, and >>>> we need to update all the controllers to let the controller to use the new >>>> code, it is not very bucket testing friendly. >>>> >>>> Thanks >>>> Hang Qi >>>> >>>> >>> >> >> >> -- >> Qi hang >> > > -- Qi hang --001a114505fe80c3ae0526579c38 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Kishore,

Thanks very much for your d= etailed instructions, I tried it on my test cluster, it works!
Thanks
Hang Qi

On Wed, Dec 2, 2015 at 12:54 PM,= kishore g <g.kishore@gmail.com> wrote:
Here are the steps. Please try them on a d= ummy cluster

Lets call the existing cluster - ServingClu= ster. First we create a new cluster called SuperCluster

helix-admin.sh createCluster SuperCluster

No= w add controller nodes C1, C2, C3 as participants to SuperCluster

helix-admin.sh addInstance SuperCluster C1=C2=A0
=
helix-admin.sh addInstance SuperCluster C2
helix-= admin.sh addInstance SuperCluster C3=C2=A0

A= dd a resource named after original cluster, ServingCluster. This resource c= an be set up in any mode.

AUTO ---> one of C1, = C2, C3 will start managing ServingCluster
SEMI_AUTO - leader is s= elected based on the preference list. If you want C2 to be the leader, set = it to C2, C3, C1. If C2 crashes, C3 will take over automatically.
CUSTOM- > you get complete control here, if you want to C2 =C2=A0to con= trol the ServingCluster, set the IS as follows. Note: there is not automati= c re-election of leader in this case.

C1:STANDBY,<= /div>
C2:LEADER,
C3:STANDBY

Stop all= controllers. Restart them in distributed mode, and this time the cluster n= ame you provide to start will be SuperCluster.

Hop= e this helps.

Once you test your changes, you can = go back to standalone mode by simply restarting the controllers again in st= andalone mode and provide the ServingCluster as the clustername.
=
Hope this helps.

Try this out on a = dummy cluster.

thanks,
Kishore G


On Wed, Dec 2, 2015 at 12:07 PM, = Hang Qi <hangq.1985@gmail.com> wrote:
Hi Kishore,=C2=A0

Thanks= very much for your response.

We are using Standal= one mode.

Do you have any instructions how to conv= ert controllers from standalone to distributed mode, I can not find it in= =C2=A0http://helix.apache.org/0.6.5-docs/tutorial_controller= .html

Thanks
Hang Qi
=

On Wed,= Dec 2, 2015 at 11:55 AM, kishore g <g.kishore@gmail.com> = wrote:
What is the mode = in which controller is deployed?=C2=A0

Standalone or Dis= tributed.=C2=A0

Standalone is the mode where we ru= n 3 controllers independently and one of them becomes the leader and starts= managing.

In Distributed, the controllers are par= ticipant of another super cluster and cluster to manage will become a resou= rce in the super cluster. This mode is useful when there are too many clust= ers and we dont need to bring up controllers for each cluster.=C2=A0
<= div>
What you want can be achieved easily with distributed mo= de. You can enable/disable controllers since they come participants of supe= r cluster.

I cant think of a straight forward way = to achieve that in standalone mode.=C2=A0

Another = option is to convert controllers from standalone to distributed. This can b= e done without causing any interruption to running servers.

<= /div>

On Wed, Dec 2, 2015 at 11:16 AM, Hang Qi <hangq.1985@gmail.com= > wrote:
= Hi All,

Is there any way to force controller to re= -elect leader, or one step further, is there any way we can force particula= r controller to be the leader?

The reason I am ask= ing is that we are using customized rebalancer, and we need to update all t= he controllers to let the controller to use the new code, it is not very bu= cket testing friendly.

Thanks
Hang Qi





<= /div>--
Qi hang




--
=
Qi hang
--001a114505fe80c3ae0526579c38--