jiajunwang commented on a change in pull request #686: Add resource partition 
weight gauge
URL: https://github.com/apache/helix/pull/686#discussion_r368191391
 
 

 ##########
 File path: 
helix-core/src/main/java/org/apache/helix/monitoring/mbeans/ClusterStatusMonitor.java
 ##########
 @@ -497,6 +497,25 @@ public void setResourceStatus(ExternalView externalView, 
IdealState idealState,
     }
   }
 
+  /**
+   * Updates metrics of average partition weight per capacity key for a 
resource. If a resource
+   * monitor is not yet existed for this resource, a new resource monitor will 
be created for this
+   * resource.
+   *
+   * @param resourceName The resource name for which partition weight is 
updated
+   * @param averageWeightMap A map of average partition weight of each 
capacity key:
+   *                         capacity key -> average partition weight
+   */
+  public void updatePartitionWeight(String resourceName, Map<String, Integer> 
averageWeightMap) {
+    ResourceMonitor monitor = _resourceMonitorMap.get(resourceName);
 
 Review comment:
   getOrCreateResourceMonitor()

----------------------------------------------------------------
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