You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2019/11/05 23:53:23 UTC

[GitHub] [helix] pkuwm commented on a change in pull request #574: Filter resource map with ideal states for instance capacity metrics.

pkuwm commented on a change in pull request #574: Filter resource map with ideal states for instance capacity metrics.
URL: https://github.com/apache/helix/pull/574#discussion_r342857181
 
 

 ##########
 File path: helix-core/src/main/java/org/apache/helix/controller/stages/CurrentStateComputationStage.java
 ##########
 @@ -237,10 +239,17 @@ private void reportInstanceCapacityMetrics(ClusterStatusMonitor clusterStatusMon
       CurrentStateOutput currentStateOutput) {
     asyncExecute(dataProvider.getAsyncTasksThreadPool(), () -> {
       try {
+        // ResourceToRebalance map also has resources from current states.
+        // Only use the resources in ideal states to parse all replicas.
+        Map<String, IdealState> idealStateMap = dataProvider.getIdealStates();
+        Map<String, Resource> metricResourceMap = resourceMap.entrySet().stream()
 
 Review comment:
   Changed.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org