use of org.apache.helix.examples.MasterSlaveStateModelFactory in project helix by apache.
the class TestZkHelixAdmin method initializeHelixManager.
private HelixManager initializeHelixManager(String clusterName, String instanceName, String zkAddress, String stateModelName) {
HelixManager manager = HelixManagerFactory.getZKHelixManager(clusterName, instanceName, InstanceType.PARTICIPANT, zkAddress);
MasterSlaveStateModelFactory stateModelFactory = new MasterSlaveStateModelFactory(instanceName);
StateMachineEngine stateMach = manager.getStateMachineEngine();
stateMach.registerStateModelFactory(stateModelName, stateModelFactory);
return manager;
}
Aggregations