cryptoe commented on code in PR #13205:
URL: https://github.com/apache/druid/pull/13205#discussion_r1023709353


##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/exec/WorkerClient.java:
##########
@@ -38,6 +40,24 @@ public interface WorkerClient extends AutoCloseable
    */
   ListenableFuture<Void> postWorkOrder(String workerTaskId, WorkOrder 
workOrder);
 
+  /**
+   * Fetches the {@link ClusterByStatisticsSnapshot} from a worker. This is 
intended to be used by the
+   * {@link WorkerSketchFetcher} under PARALLEL or AUTO modes.
+   */
+  ClusterByStatisticsSnapshot fetchClusterByStatisticsSnapshot(String 
workerTaskId, String queryId, int stageNumber)
+      throws ExecutionException, InterruptedException;
+
+  /**
+   * Fetches a {@link ClusterByStatisticsSnapshot} which contains only the 
sketch of the specified timeChunk.
+   * This is intended to be used by the {@link WorkerSketchFetcher} under 
SEQUENTIAL or AUTO modes.
+   */
+  ClusterByStatisticsSnapshot fetchClusterByStatisticsSnapshotForTimeChunk(

Review Comment:
   I think we should make this API non blocking. 
   Return 
   LIstenableFuture<ClusterByStatisticsSnapshot> and on complete we can do 
stuff on it. 
   Check the TaskContactFn() in controller impl.
   This will simplify the WorkerSketchFetcher.java a lot. 



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