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: Potential bug in manual partition placement
Date Wed, 20 Feb 2013 07:02:57 GMT
https://github.com/mingfang/apache-helix/blob/master/helix-core/src/main/resources/manual.json
has
replicas set to 2 but the preference list for each partition is of size 3.
If you set the number of REPLICAS to 3, it should work.

We do some validation of the idealstate but we dont validate that number of
replicas is same as the preference list size for all partitions. Created
JIRA https://issues.apache.org/jira/browse/HELIX-50


Thanks,
Kishore G














On Tue, Feb 19, 2013 at 7:08 PM, Ming Fang <mingfang@mac.com> wrote:

> I've "repurpose" the Quickstart example in an attempt to implement manual
> placement of partitions.
> I'm using JSON file and the relevant section is below
>
>         "MyResource_0" : [ "localhost_12000", "localhost_12001",
> "localhost_12002" ],
>         "MyResource_1" : [ "localhost_12001", "localhost_12000",
> "localhost_12002" ]
>
> The goal is to make _12000 the MASTER for MyResource_0 and _12001 the
> MASTER of MyResource_1.
> The last instance, _12002 will serve as the last resort backup for both
> partitions in the event the other two died.
> This is a small example of what I was hoping to implement as part of a
> larger system.
>
> You may run the example here
>
> https://github.com/mingfang/apache-helix/blob/master/helix-core/src/main/java/org/apache/helix/examples/ManualPlacementTest.java
>
> using the JSON file here
>
> https://github.com/mingfang/apache-helix/blob/master/helix-core/src/main/resources/manual.json
>
> The problem is when I run this, the output looks like this
>
> STARTING Zookeeper at localhost:2199
> Creating cluster: HELIX_QUICKSTART
> Adding 3 participants to the cluster
>          Added participant: localhost_12000
>          Added participant: localhost_12001
>          Added participant: localhost_12002
> Starting Participants
>          Started Participant: localhost_12000
>          Started Participant: localhost_12001
>          Started Participant: localhost_12002
> Starting Helix Controller
> localhost_12000 transitioning from OFFLINE to SLAVE for MyResource_0
> localhost_12002 transitioning from OFFLINE to SLAVE for MyResource_1
> localhost_12000 transitioning from OFFLINE to SLAVE for MyResource_1
> localhost_12002 transitioning from OFFLINE to SLAVE for MyResource_0
> localhost_12000 transitioning from SLAVE to MASTER for MyResource_0
> localhost_12001 transitioning from OFFLINE to SLAVE for MyResource_0
> CLUSTER STATE: After starting 3 nodes
>                 localhost_12000 localhost_12001 localhost_12002
>         MyResource_0    M               S               S
>         MyResource_1    S               -               S
> ###################################################################
>
> Notice there is no MASTER for MyResource_1.
> I've been trying to debug this for a day now with no success.
>
> Did I stumble onto an actual bug?

Mime
View raw message