You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2020/08/14 21:46:18 UTC

[GitHub] [druid] jihoonson commented on a change in pull request #10278: Don't log the entire task spec

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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org