jihoonson commented on a change in pull request #11554:
URL: https://github.com/apache/druid/pull/11554#discussion_r706417740
##########
File path:
indexing-service/src/main/java/org/apache/druid/indexing/overlord/ForkingTaskRunner.java
##########
@@ -650,36 +653,38 @@ String getMaskedCommand(List<String> maskedProperties,
List<String> command)
}
@Override
- public long getTotalTaskSlotCount()
+ public Map<String, Long> getTotalTaskSlotCount()
{
if (config.getPorts() != null && !config.getPorts().isEmpty()) {
- return config.getPorts().size();
+ return ImmutableMap.of(workerConfig.getCategory(),
Long.valueOf(config.getPorts().size()));
}
- return config.getEndPort() - config.getStartPort() + 1;
+ return ImmutableMap.of(workerConfig.getCategory(),
Long.valueOf(config.getEndPort() - config.getStartPort() + 1));
}
@Override
- public long getIdleTaskSlotCount()
+ public Map<String, Long> getIdleTaskSlotCount()
{
- return Math.max(getTotalTaskSlotCount() - getUsedTaskSlotCount(), 0);
+ Map<String, Long> totalTaskSlots = getTotalTaskSlotCount();
+ Map<String, Long> usedTaskSlots = getUsedTaskSlotCount();
+ return ImmutableMap.of(workerConfig.getCategory(),
Math.max(totalTaskSlots.get(workerConfig.getCategory()) -
usedTaskSlots.get(workerConfig.getCategory()), 0));
Review comment:
Yes, that is what I meant.
--
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]