public synchronized void addTopicToMirrorMaker(String topicName, int numTopicPartitions) { setEmptyResourceConfig(topicName); updateCurrentServingInstance(); synchronized (_currentServingInstance) { _helixAdmin.addResource(_helixClusterName, topicName, IdealStateBuilder.buildCustomIdealStateFor(topicName, numTopicPartitions, _currentServingInstance)); } }
public synchronized void expandTopicInMirrorMaker(String topicName, int newNumTopicPartitions) { updateCurrentServingInstance(); synchronized (_currentServingInstance) { _helixAdmin.setResourceIdealState(_helixClusterName, topicName, IdealStateBuilder.expandCustomRebalanceModeIdealStateFor( _helixAdmin.getResourceIdealState(_helixClusterName, topicName), topicName, newNumTopicPartitions, _currentServingInstance)); } }
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"); } }
assignIdealStates(_helixManager, idealStatesFromAssignment); _helixMirrorMakerManager.updateCurrentServingInstance(); _rebalanceRate.mark(); } finally {
public PriorityQueue<InstanceTopicPartitionHolder> getCurrentServingInstance() { updateCurrentServingInstance(); return _currentServingInstance; }
public synchronized void addTopicToMirrorMaker(String topicName, int numTopicPartitions) { setEmptyResourceConfig(topicName); updateCurrentServingInstance(); synchronized (_currentServingInstance) { _helixAdmin.addResource(_helixClusterName, topicName, IdealStateBuilder.buildCustomIdealStateFor(topicName, numTopicPartitions, _currentServingInstance)); } }
public synchronized void expandTopicInMirrorMaker(String topicName, int newNumTopicPartitions) { updateCurrentServingInstance(); synchronized (_currentServingInstance) { _helixAdmin.setResourceIdealState(_helixClusterName, topicName, IdealStateBuilder.expandCustomRebalanceModeIdealStateFor( _helixAdmin.getResourceIdealState(_helixClusterName, topicName), topicName, newNumTopicPartitions, _controllerConf, _currentServingInstance)); } }
assignIdealStates(_helixManager, idealStatesFromAssignment); _helixMirrorMakerManager.updateCurrentServingInstance(); _rebalanceRate.mark(); } finally {
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 = new AutoRebalanceLiveInstanceChangeListener(this, _helixZkManager, _controllerConf); updateCurrentServingInstance(); _workloadInfoRetriever.start(); _offsetMonitor.start(); try { _helixZkManager.addLiveInstanceChangeListener(_autoRebalanceLiveInstanceChangeListener); } catch (Exception e) { LOGGER.error("Failed to add LiveInstanceChangeListener"); } }