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/04 20:28:14 UTC

[GitHub] [helix] jiajunwang commented on a change in pull request #557: Add instance capacity gauge

jiajunwang commented on a change in pull request #557: Add instance capacity gauge
URL: https://github.com/apache/helix/pull/557#discussion_r342228364
 
 

 ##########
 File path: helix-core/src/main/java/org/apache/helix/monitoring/mbeans/ClusterStatusMonitor.java
 ##########
 @@ -367,22 +367,28 @@ public void increaseMessageReceived(List<Message> messages) {
   }
 
   /**
-   * Update max capacity usage for per instance. Before calling this API, we assume the instance
-   * monitors are already registered in ReadClusterDataStage. If the monitor is not registered, this
-   * max usage update will fail.
+   * Update instance capacity status for per instance, including max usage and capacity of each
+   * capacity key. Before calling this API, we assume the instance monitors are already registered
+   * in ReadClusterDataStage. If the monitor is not registered, this instance capacity status update
+   * will fail. Keys for maxUsageMap and capacityMap should be the same.
    *
-   * @param maxUsageMap a map of max capacity usage, {instance: maxCapacityUsage}
+   * @param maxUsageMap A map of max capacity usage, {instance: maxCapacityUsage}
+   * @param capacityMap A map of instance capacity, {instance: {capacity key: capacity value}}
    */
-  public void updateInstanceMaxUsage(Map<String, Double> maxUsageMap) {
+  public void updateInstanceCapacityStatus(Map<String, Double> maxUsageMap,
+      Map<String, Map<String, Integer>> capacityMap) {
     synchronized (_instanceMonitorMap) {
       for (Map.Entry<String, Double> entry : maxUsageMap.entrySet()) {
 
 Review comment:
   There is no guarantee the two mappings have the same key list.
   Please split the for loop cleanly.

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