helix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kanak Biscuitwala <kana...@hotmail.com>
Subject RE: Question regarding to CUSTOMIZED balance mode
Date Sat, 19 Sep 2015 18:19:01 GMT

Yeah, you need to register a custom code runner. Here is an example: https://github.com/apache/helix/blob/master/helix-core/src/test/java/org/apache/helix/integration/TestHelixCustomCodeRunner.java


From: hangq.1985@gmail.com
Date: Mon, 14 Sep 2015 23:04:21 -0700
Subject: Question regarding to CUSTOMIZED balance mode
To: user@helix.apache.org


We are evaluating CUSTOMIZED balance mode in helix 0.6.4 currently, and I have one question
regarding to it.

How do I handle cluster failure case, e.g. the initial ideal state as following:
"mapFields" : {
   "MyResource_0" : {
     "N1" : "MASTER",
     "N2" : "SLAVE",
If N1 goes down, N2 will not become MASTER automatically, right? 

If so, how do I register the listener for cluster state change to update ideal state? The
doc says "The application needs to implement a callback interface that Helix invokes when
the cluster state changes. Within this callback, the application can recompute the idealstate.",
is that interface Rebalancer?

Do we have an example for CUSTOMIZED balance?

Besides, when looking at the code, CustomRebalancer implements Rebalancer interface, and
just returns currentIdealState when computeNewIdealState is called.

Hang Qi 		 	   		  
View raw message