github-code-scanning[bot] commented on code in PR #14582:
URL: https://github.com/apache/druid/pull/14582#discussion_r1264107086
##########
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTask.java:
##########
@@ -268,7 +268,27 @@
protected abstract SeekableStreamIndexTaskRunner<PartitionIdType,
SequenceOffsetType, RecordType> createTaskRunner();
- protected abstract RecordSupplier<PartitionIdType, SequenceOffsetType,
RecordType> newTaskRecordSupplier();
+ /**
+ * Deprecated method for providing the {@link RecordSupplier} that connects
with the stream. New extensions should
+ * overide {@link #newTaskRecordSupplier(TaskToolbox)} instead.
+ */
+ @Deprecated
+ protected RecordSupplier<PartitionIdType, SequenceOffsetType, RecordType>
newTaskRecordSupplier()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * Subclasses must override this method to provide the {@link
RecordSupplier} that connects with the stream.
+ *
+ * The default implementation delegates to {@link #newTaskRecordSupplier()},
which is deprecated, in order to support
+ * existing extensions that have implemented that older method instead of
this newer one. New extensions should
+ * override this method, not {@link #newTaskRecordSupplier()}.
+ */
+ protected RecordSupplier<PartitionIdType, SequenceOffsetType, RecordType>
newTaskRecordSupplier(final TaskToolbox toolbox)
+ {
+ return newTaskRecordSupplier();
Review Comment:
## Deprecated method or constructor invocation
Invoking [SeekableStreamIndexTask.newTaskRecordSupplier](1) should be
avoided because it has been deprecated.
[Show more
details](https://github.com/apache/druid/security/code-scanning/5282)
--
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]