Anubhav-Roy commented on code in PR #20299:
URL: https://github.com/apache/druid/pull/20299#discussion_r4282427089
##########
indexing-service/src/main/java/org/apache/druid/indexing/overlord/hrtr/WorkerHolder.java:
##########
@@ -149,14 +152,31 @@ public void setBlacklistedUntil(DateTime blacklistedUntil)
public ImmutableWorkerInfo toImmutable()
{
- return ImmutableWorkerInfo.fromWorkerAnnouncements(
+ final ImmutableWorkerInfo announcementsView = announcementsViewRef.get();
+ return new ImmutableWorkerInfo(
getWorker(),
- tasksSnapshotRef.get(),
+ announcementsView.getCurrCapacityUsed(),
+ announcementsView.getCurrParallelIndexCapacityUsed(),
+ announcementsView.getCurrCapacityUsedByTaskType(),
Review Comment:
Fair callout. fixed.
toImmutable() now returns the task-type map wrapped in
Collections.unmodifiableMap. Also covered by
testToImmutableDoesNotExposeCachedCapacityByTaskType.
--
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]