The methods in StateModel subclasses are invoked by reflection, generating 
names from the state transition message. You have two options here: naming your 
method as in the example per state transition, or by using the 
@Transition(from="FROMSTATE", to="TOSTATE") annotation.

A controller participant is confusingly named. The idea is that if you have 
multiple clusters, we want to have a set of controllers manage all of them. So 
we have a cluster of controllers as participants where the resources are other 
clusters that the controllers should manage. This is the "distributed" 
controller mode.

Kanak
________________________________
> Date: Wed, 19 Feb 2014 10:54:21 -0800 
> Subject: Helix 0.6.2: State Model question 
> From: [email protected] 
> To: [email protected] 
> 
> I am looking at Quickstart.java in helix/examples. I see there are two 
> state models need to be defined 
> 
> (1) Instance state model which defines the transitions for nodes in the 
> cluster 
> (2) Node state model which listens to transitions occurring on a given node. 
> 
> I looked at the MasterSlaveStateModel and notice APIs in there like 
> 
> onBecomeSlaveFromOffline(Message message, NotificationContext context) 
> 
> they are not available on the base StateModel class. 
> 
> Are these callbacks assumed to be defined on the extension of the 
> StateModel which is registered? Does the reporting mechanism infer 
> these methods based on the state-transitions defined in (1) above? 
> 
> The other question is can I simply have one node registered as 
> InstanceType.CONTROLLER_PARTICIPANT? Would I use that type if I were to 
> build a peer-peer network? 
> 
> Thanks, 
> 
> Sandeep                                         

Reply via email to