imply-cheddar commented on code in PR #14582:
URL: https://github.com/apache/druid/pull/14582#discussion_r1263151890


##########
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskRunner.java:
##########
@@ -418,6 +419,13 @@ private TaskStatus runInternal(TaskToolbox toolbox) throws 
Exception
 
     try (final RecordSupplier<PartitionIdType, SequenceOffsetType, RecordType> 
recordSupplier = task.newTaskRecordSupplier()) {
 
+      if (toolbox.getMonitorScheduler() != null) {
+        final Monitor monitor = recordSupplier.monitor();
+        if (monitor != null) {
+          toolbox.getMonitorScheduler().addMonitor(monitor);
+        }
+      }
+

Review Comment:
   Instead of registering it hear, this should really be the job of the 
`newTaskRecordSupplier()` call.  How about we change that method to take 
`TaskToolbox` and add a default implementation of that which delegates to the 
no-argument call.



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

Reply via email to