helix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hang Qi <hangq.1...@gmail.com>
Subject Question regarding to CUSTOMIZED balance mode
Date Tue, 15 Sep 2015 06:04:21 GMT
Hi,

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
<http://helix.apache.org/0.6.4-docs/tutorial_rebalance.html> 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
<https://github.com/apache/helix/blob/helix-0.6.4/helix-core/src/main/java/org/apache/helix/controller/rebalancer/Rebalancer.java>
?

Do we have an example for CUSTOMIZED balance?

Besides, when looking at the code, CustomRebalancer
<https://github.com/apache/helix/blob/helix-0.6.4/helix-core/src/main/java/org/apache/helix/controller/rebalancer/CustomRebalancer.java>
implements
Rebalancer interface, and just returns currentIdealState when
computeNewIdealState is called.

Thanks
Hang Qi

Mime
View raw message