@Override
  public void participateAndBlockStateTransition(List<AmbryStatsReport> ambryStatsReports,
      AccountStatsStore accountStatsStore, Callback<AggregatedAccountStorageStats> callback) throws IOException {
    logger.info("Initiating the participation. The specified state model is {}",
        clusterMapConfig.clustermapStateModelDefinition);
    //Register state transition model
    StateMachineEngine stateMachineEngine = manager.getStateMachineEngine();
    stateMachineEngine.registerStateModelFactory(clusterMapConfig.clustermapStateModelDefinition,
        new AmbryStateModelFactory(clusterMapConfig, this, clusterManager));
    registerTasks(stateMachineEngine, ambryStatsReports, accountStatsStore, callback);
    this.blockStateTransitionLatch = new CountDownLatch(1);
    try {
      // register server as a participant
      manager.connect();
    } catch (Exception e) {
      throw new IOException("Exception while connecting to the Helix manager", e);
    }
    logger.info("Completed participation in cluster {} at {}", clusterName, zkConnectStr);
  }
Initiate the participation by registering via the {@link HelixManager} as a participant to the associated
Helix cluster.
@throws IOException if there is an error connecting to the Helix cluster.
@param ambryStatsReports {@link List} of {@link AmbryStatsReport} to be registered to the participant.
@param accountStatsStore the {@link AccountStatsStore} to retrieve and store container stats.
@param callback a callback which will be invoked when the aggregation report has been generated successfully.
ambry-clustermap/src/main/java/com/github/ambry/clustermap/HelixParticipant.java