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: Specifying partition placement using AUTO
Date Thu, 14 Feb 2013 17:14:26 GMT
Hi Ming,

There is an example
admin.addResource(clusterName, resourceName, numPartitions,
stateModelName, "AUTO");
// rebalance resource "TestDB" using 3 replicas
admin.rebalance(clusterName, resourceName, numReplica);

This will automatically do the partition placement among the nodes in the
cluster. We use a mix of consistent hashing and crush
http://www.ssrc.ucsc.edu/Papers/weil-sc06.pdf to do the placement.

But i think you need a way to come up with your own logic of assigning the
replica set for a partition. You can find an example for that in
BaseStageTest. See setupIdealState

Here is the code snippet.http://pastebin.com/e2LXtq46.

Hope this helps

Kishore G

On Thu, Feb 14, 2013 at 8:03 AM, Ming Fang <mingfang@mac.com> wrote:

> Can someone point me to an example of how to specify partition placement
> when using AUTO mode?
> The link here http://helix.incubator.apache.org/Features.html says it's
> possible but I was not able to find any example or unit test that does this.
> Thanks
> --ming

View raw message