helix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Varun Sharma <va...@pinterest.com>
Subject Re: Questions about custom helix rebalancer/controller/agent
Date Thu, 31 Jul 2014 23:11:25 GMT
Think I found the code samples from the examples directory and also some
samples in the Controller section of the tutorial.

I still had the question of how one can disable Helix from triggering the
balancing completely so I can explicitly keep calling rebalance every X
minutes instead of Helix doing the rebalancing ?


On Thu, Jul 31, 2014 at 12:13 PM, Varun Sharma <varun@pinterest.com> wrote:

> Hi,
> I am trying to write a customized rebalancing algorithm. I would like to
> run the rebalancer every 30 minutes inside a single thread. I would also
> like to completely disable Helix triggering the rebalancer.
> I have a few questions:
> 1) What's the best way to run the custom controller ? Can I simply
> instantiate a ZKHelixAdmin object and then keep running my rebalancer
> inside a thread or do I need to do something more.
> Apart from rebalancing, I want to do other things inside the the
> controller, so it would be nice if I could simply fire up the controller
> through code. I could not find this in the documentation.
> 2) Same question for the Helix agent. My Helix Agent is a JVM process
> which does other things apart from exposing the callbacks for state
> transitions. Is there a code sample for the same ?
> 3) How do I disable Helix triggered rebalancing once I am able to run the
> custom controller ?
> 4) During my custom rebalance run, how I can get the current cluster state
> - is it through ClusterDataCache.getIdealState() ?
> 5) For clients talking to the cluster, does helix provide an easy
> abstraction to find the partition distribution for a helix resource ?
> Thanks

View raw message