kfaraz commented on code in PR #14507:
URL: https://github.com/apache/druid/pull/14507#discussion_r1276335719
##########
indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/ParallelIndexSupervisorTask.java:
##########
@@ -1817,6 +1824,24 @@ static Map<String, Object> getTaskReport(final
OverlordClient overlordClient, fi
}
}
+ /**
+ * To be called only after the toolbox has been set in runTask
+ *
+ * @return the base input source with the toolbox
+ */
+ private InputSource getInputSource()
+ {
+ InputSource inputSource = inputSourceRef.get();
+ if (inputSource == null) {
+ inputSource = this.baseInputSource;
+ if (inputSource instanceof TaskInputSource) {
+ inputSource = ((TaskInputSource) inputSource).withTaskToolbox(toolbox);
+ }
+ inputSourceRef.set(inputSource);
+ }
+ return inputSource;
Review Comment:
```suggestion
if (inputSourceRef.get() == null) {
final InputSource inputSource;
if (baseInputSource instanceof TaskInputSource) {
inputSource = ((TaskInputSource)
baseInputSource).withTaskToolbox(toolbox);
} else {
inputSource = baseInputSource;
}
inputSourceRef.set(inputSource);
}
return inputSourceRef.get();
```
--
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]