helix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kishore g <g.kish...@gmail.com>
Subject Re: Is there any way to force controller to re-elect leader
Date Wed, 02 Dec 2015 20:54:47 GMT
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
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.


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.

Kishore G

On Wed, Dec 2, 2015 at 12:07 PM, Hang Qi <hangq.1985@gmail.com> 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 <g.kishore@gmail.com> 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 <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 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

View raw message