@Override public void run() { try { rebalanceCurrentCluster(_helixMirrorMakerManager.getCurrentLiveInstances()); } catch (Exception e) { LOGGER.error("Got exception during rebalance the whole cluster! ", e); } } }, _delayedAutoReblanceTimeInSeconds, TimeUnit.SECONDS);
@Override public void run() { try { rebalanceCurrentCluster(_helixMirrorMakerManager.getCurrentLiveInstances(), _helixMirrorMakerManager.getBlacklistedInstances(), true, false); } catch (Exception e) { LOGGER.error("Got exception during rebalance the whole cluster! ", e); } } }, _delayedAutoReblanceTimeInSeconds, TimeUnit.SECONDS);
@Override public void run() { try { if (_helixMirrorMakerManager.getWorkloadInfoRetriever().isInitialized() && System.currentTimeMillis() - _lastRebalanceTimeMillis > 1000L * minIntervalInSeconds) { rebalanceCurrentCluster(_helixMirrorMakerManager.getCurrentLiveInstances(), _helixMirrorMakerManager.getBlacklistedInstances(), false, false); } } catch (Exception e) { LOGGER.error("Got exception during periodically rebalancing the whole cluster! ", e); } } }, Math.max(_delayedAutoReblanceTimeInSeconds, autoRebalancePeriodInSeconds), autoRebalancePeriodInSeconds,
public boolean triggerRebalanceCluster() { try { if (!_helixMirrorMakerManager.getWorkloadInfoRetriever().isInitialized()) { return false; } rebalanceCurrentCluster(_helixMirrorMakerManager.getCurrentLiveInstances(), _helixMirrorMakerManager.getBlacklistedInstances(), false, true); return true; } catch (Exception e) { LOGGER.error("Got exception during manually triggering rebalance the whole cluster! ", e); return false; } }