gianm commented on code in PR #14581:
URL: https://github.com/apache/druid/pull/14581#discussion_r1272488361


##########
server/src/main/java/org/apache/druid/rpc/indexing/OverlordClient.java:
##########
@@ -43,17 +52,129 @@
  */
 public interface OverlordClient
 {
+  /**
+   * Contact the Overlord that we believe to be the leader, and return the 
result of its
+   * {@code /druid/indexer/v1/leader} API. This may be a different Overlord 
server than the one we contacted, if
+   * a leader change happened since the last time we updated our sense of who 
the leader is.
+   */
+  ListenableFuture<URI> findCurrentLeader();
+
+  /**
+   * Run a task with the provided ID and payload. The payload must be 
convertible by an
+   * {@link com.fasterxml.jackson.databind.ObjectMapper} into a Task object. 
This method does not take Task objects
+   * directly, because Task is in the indexing-service package.
+   *
+   * @param taskId     task ID
+   * @param taskObject task payload
+   */
   ListenableFuture<Void> runTask(String taskId, Object taskObject);
 
+  /**
+   * Run a "kill" task for a particular datasource and interval. Shortcut to 
{@link #runTask(String, Object)}.
+   *
+   * @param idPrefix   Descriptive prefix to include at the start of task IDs
+   * @param dataSource Datasource to kill
+   * @param interval   Interval to kill
+   */
+  default ListenableFuture<Void> runKillTask(String idPrefix, String 
dataSource, Interval interval)

Review Comment:
   I thought it would be good to emphasize that this method runs a task, as 
opposed to `killPendingSegments`, which is done by the Overlord itself inline 
with the API call. So, IMO, the names being different is a good thing.
   
   I updated the javadocs to be more clear about exactly what these methods do.



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