jihoonson commented on a change in pull request #11554:
URL: https://github.com/apache/druid/pull/11554#discussion_r707906935
##########
File path:
indexing-service/src/main/java/org/apache/druid/indexing/overlord/SingleTaskBackgroundRunner.java
##########
@@ -314,33 +317,33 @@ public TaskLocation getTaskLocation(String taskId)
}
@Override
- public long getTotalTaskSlotCount()
+ public Map<String, Long> getTotalTaskSlotCount()
{
- return 1;
+ return ImmutableMap.of(WorkerConfig.DEFAULT_CATEGORY, 1L);
Review comment:
I would agree that returning 1 is reasonable if there was no category
returned in this method as it was before. Now, this method always returns the
default category, which could be wrong when your middleManager has a different
category configured. It seems a bit clearer to me if it throws
`UnsupportedOperationException`. In any case, it would be great if you can add
some comment saying "This method should be never called in peons".
--
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]