jihoonson commented on a change in pull request #10278:
URL: https://github.com/apache/druid/pull/10278#discussion_r470878798



##########
File path: 
server/src/main/java/org/apache/druid/client/indexing/HttpIndexingServiceClient.java
##########
@@ -67,7 +67,8 @@ public HttpIndexingServiceClient(
   @Override
   public void killUnusedSegments(String dataSource, Interval interval)
   {
-    runTask(new ClientKillUnusedSegmentsTaskQuery(dataSource, interval));
+    final ClientTaskQuery taskQuery = new 
ClientKillUnusedSegmentsTaskQuery(null, dataSource, interval);
+    runTask(taskQuery.getId(), taskQuery);

Review comment:
       `ClientTaskQuery` is used by the coordinator when it issues kill tasks 
or compaction tasks. The coordinator cannot use `Task` directly because of a 
dependency issue, and so `ClientTaskQuery` is supposed to be equivalent to 
`Task`. The `id` of `taskQuery` should be same with the `id` of `task` for that 
reason after it is deserialized in the overlord. I think we still need an ID 
field for `ClientTaskQuery`.
   
   However, I like the idea of passing in the ID. When the coordinator issues a 
task, we can generate an ID distinguishable from those issued by users. After 
this PR, the ID of compaction and kill tasks will be prefixed by 
`coordinator-issued` if they are submitted by coordinator. `api-issued` prefix 
will be used when a kill task is issued by calling 
`DataSourcesResource.killUnusedSegmentsInInterval()`.




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

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