jasonk000 commented on a change in pull request #12096:
URL: https://github.com/apache/druid/pull/12096#discussion_r816281705
##########
File path:
indexing-service/src/main/java/org/apache/druid/indexing/overlord/ZkWorker.java
##########
@@ -102,19 +136,29 @@ public Worker getWorker()
@JsonProperty("currCapacityUsed")
public int getCurrCapacityUsed()
+ {
+ return getCurrCapacityUsed(getRunningTasks());
+ }
+
+ static int getCurrCapacityUsed(Map<String, TaskAnnouncement> tasks)
{
int currCapacity = 0;
- for (TaskAnnouncement taskAnnouncement : getRunningTasks().values()) {
+ for (TaskAnnouncement taskAnnouncement : tasks.values()) {
currCapacity += taskAnnouncement.getTaskResource().getRequiredCapacity();
}
return currCapacity;
}
@JsonProperty("availabilityGroups")
public Set<String> getAvailabilityGroups()
+ {
+ return getAvailabilityGroups(getRunningTasks());
+ }
+
+ static Set<String> getAvailabilityGroups(Map<String, TaskAnnouncement> tasks)
Review comment:
fixed in
https://github.com/apache/druid/pull/12096/commits/b9b13195c4c640ceaf73d18f5fea355bf86247fd
##########
File path:
indexing-service/src/main/java/org/apache/druid/indexing/overlord/ZkWorker.java
##########
@@ -102,19 +136,29 @@ public Worker getWorker()
@JsonProperty("currCapacityUsed")
public int getCurrCapacityUsed()
+ {
+ return getCurrCapacityUsed(getRunningTasks());
+ }
+
+ static int getCurrCapacityUsed(Map<String, TaskAnnouncement> tasks)
Review comment:
fixed in
https://github.com/apache/druid/pull/12096/commits/b9b13195c4c640ceaf73d18f5fea355bf86247fd
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]