public static synchronized HelixManager setup(String helixClusterName, String zkPath, String controllerInstanceId) { try { createHelixClusterIfNeeded(helixClusterName, zkPath); } catch (final Exception e) { LOGGER.error("Caught exception", e); return null; } try { return startHelixControllerInStandadloneMode(helixClusterName, zkPath, controllerInstanceId); } catch (final Exception e) { LOGGER.error("Caught exception", e); return null; } }
public synchronized void start() { LOGGER.info("Trying to start HelixMirrorMakerManager!"); _helixZkManager = HelixSetupUtils.setup(_helixClusterName, _helixZkURL, _instanceId); _helixAdmin = _helixZkManager.getClusterManagmentTool(); LOGGER.info("Trying to register AutoRebalanceLiveInstanceChangeListener"); AutoRebalanceLiveInstanceChangeListener autoRebalanceLiveInstanceChangeListener = new AutoRebalanceLiveInstanceChangeListener(this, _helixZkManager, _controllerConf.getAutoRebalanceDelayInSeconds()); updateCurrentServingInstance(); try { _helixZkManager.addLiveInstanceChangeListener(autoRebalanceLiveInstanceChangeListener); } catch (Exception e) { LOGGER.error("Failed to add LiveInstanceChangeListener"); } }