jiajunwang commented on a change in pull request #1215:
URL: https://github.com/apache/helix/pull/1215#discussion_r466072176



##########
File path: helix-core/src/main/java/org/apache/helix/model/ClusterConfig.java
##########
@@ -788,39 +791,43 @@ public void setDefaultPartitionWeightMap(Map<String, 
Integer> weightDataMap)
   private void setDefaultCapacityMap(ClusterConfigProperty 
capacityPropertyType,
       Map<String, Integer> capacityDataMap) throws IllegalArgumentException {
     if (capacityDataMap == null) {
-      throw new IllegalArgumentException("Default capacity data is null");
+      _record.getMapFields().remove(capacityPropertyType.name());
+    } else {
+      Map<String, String> data = new HashMap<>();
+      capacityDataMap.entrySet().stream().forEach(entry -> {
+        if (entry.getValue() < 0) {

Review comment:
       The value is not a string, it is Integer.




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



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

Reply via email to