helix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ming Fang <mingf...@mac.com>
Subject Potential bug in manual partition placement
Date Wed, 20 Feb 2013 03:08:53 GMT
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