AmatyaAvadhanula commented on code in PR #14507:
URL: https://github.com/apache/druid/pull/14507#discussion_r1278555523


##########
indexing-service/src/main/java/org/apache/druid/indexing/common/task/IndexTask.java:
##########
@@ -1207,10 +1209,15 @@ public InputSource getNonNullInputSource()
     public InputSource getNonNullInputSource(TaskToolbox toolbox)
     {
       Preconditions.checkNotNull(inputSource, "inputSource");
-      if (inputSource instanceof TaskInputSource && toolbox != null) {
-        return ((TaskInputSource) inputSource).withTaskToolbox(toolbox);
+      if (inputSourceWithToolbox.get() == null) {
+        final InputSource theInputSource;

Review Comment:
   Yes, removed



##########
indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/ParallelIndexSupervisorTask.java:
##########
@@ -156,7 +158,11 @@ public class ParallelIndexSupervisorTask extends 
AbstractBatchIndexTask implemen
    * Only the compaction task can have a special base name.
    */
   private final String baseSubtaskSpecName;
+
   private final InputSource baseInputSource;
+  // A reference to the baseInputSource or another input source craeted using 
the baseInputSource and a TaskToolbox
+  // This helps return the same object
+  private final AtomicReference<InputSource> inputSource = new 
AtomicReference<>();

Review Comment:
   Done



##########
indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/ParallelIndexSupervisorTask.java:
##########
@@ -1817,6 +1824,25 @@ 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()

Review Comment:
   Done



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