nozjkoitop commented on code in PR #16889:
URL: https://github.com/apache/druid/pull/16889#discussion_r1775012320


##########
indexing-service/src/main/java/org/apache/druid/indexing/overlord/ImmutableWorkerInfo.java:
##########
@@ -260,12 +399,24 @@ public boolean equals(Object o)
              : that.blacklistedUntil != null);
   }
 
+  public Map<String, Integer> incrementTypeSpecificCapacity(String type, int 
capacityToAdd)
+  {
+    Map<String, Integer> result = new HashMap<>(typeSpecificCapacityMap);
+    if (result.containsKey(type)) {
+      result.put(type, result.get(type) + capacityToAdd);
+    } else {
+      result.put(type, capacityToAdd);
+    }

Review Comment:
   Nice catch, thanks!



##########
indexing-service/src/main/java/org/apache/druid/indexing/overlord/ImmutableWorkerInfo.java:
##########
@@ -57,6 +63,7 @@ public ImmutableWorkerInfo(
       @JsonProperty("worker") Worker worker,
       @JsonProperty("currCapacityUsed") int currCapacityUsed,
       @JsonProperty("currParallelIndexCapacityUsed") int 
currParallelIndexCapacityUsed,
+      @JsonProperty("currTypeSpecificCapacityUsed") @Nullable Map<String, 
Integer> typeSpecificCapacityMap,

Review Comment:
   Updated



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

To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org

Reply via email to