FrankChen021 commented on code in PR #20293:
URL: https://github.com/apache/druid/pull/20293#discussion_r3996623011


##########
multi-stage-query/src/main/java/org/apache/druid/msq/exec/ControllerHolder.java:
##########
@@ -169,7 +181,15 @@ public ListenableFuture<?> runAsync(
       Thread.currentThread().setName(makeThreadName());
 
       try {
-        final CaptureReportQueryListener reportListener = new 
CaptureReportQueryListener(listener);
+        final CaptureReportQueryListener reportListener = new 
CaptureReportQueryListener(listener)
+        {
+          @Override
+          public void onQueryComplete(final MSQTaskReportPayload report)
+          {
+            finalReport = TaskReport.buildTaskReports(new 
MSQTaskReport(controller.queryId(), report));

Review Comment:
   this makes the code better orgainized. However, if we return the final 
report via the `controller.liveReports method`, it changes the semantics of the 
/liveReports endpoint when a query finishes. previously this endpoints return 
404 when a query finishes, by above suggestion, a 200 with final report will be 
returned. And even if this behaviour change is OK, returning a final report via 
the /liveReport endpoint looks weired.
   
   So I will keep `liveReports` method but add a new `finalReport` method 
independently



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