jiajunwang commented on a change in pull request #525: Add waged rebalancer 
monitoring mbean metrics
URL: https://github.com/apache/helix/pull/525#discussion_r337790772
 
 

 ##########
 File path: 
helix-core/src/main/java/org/apache/helix/controller/rebalancer/waged/WagedRebalancer.java
 ##########
 @@ -330,6 +334,11 @@ private void 
refreshBaseline(ResourceControllerDataProvider clusterData,
       Map<HelixConstants.ChangeType, Set<String>> clusterChanges, Map<String, 
Resource> resourceMap,
       final CurrentStateOutput currentStateOutput) throws 
HelixRebalanceException {
     LOG.info("Start calculating the new baseline.");
+    CountMetric globalBaselineCalcCounter = _metricCollector.getMetric(
+        
WagedRebalancerMetricCollector.WagedRebalancerMetricNames.GlobalBaselineCalcCounter.name(),
+        CountMetric.class);
+    globalBaselineCalcCounter.increaseCount(REBALANCE_COUNTER_INCREMENT);
 
 Review comment:
   If you really think it is necessary to remove the hardcoded 1L, let's make a 
new method increaseCount() which increases by one by default.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to