i3wangyi commented on a change in pull request #348: Adding the configuration 
items of the WAGED rebalancer.
URL: https://github.com/apache/helix/pull/348#discussion_r307439825
 
 

 ##########
 File path: helix-core/src/main/java/org/apache/helix/model/InstanceConfig.java
 ##########
 @@ -505,6 +505,46 @@ public void setMaxConcurrentTask(int maxConcurrentTask) {
     _record.setIntField(InstanceConfigProperty.MAX_CONCURRENT_TASK.name(), 
maxConcurrentTask);
   }
 
+  /**
+   * Get the instance capacity information from the map fields
+   * @return data map if it exists, or empty map
+   */
+  public Map<String, Integer> getInstanceCapacityMap() {
+    Map<String, String> capacityData = 
_record.getMapField(InstanceConfigProperty.INSTANCE_CAPACITY_MAP.name());
 
 Review comment:
   Can you enhance the checks in _record.getMapFields? E.g if we know sure the 
worst case of returned map is empty map which cannot be null. A lot of 
redundant checks here and there can be avoided.

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

Reply via email to