zhangyue19921010 commented on a change in pull request #10524:
URL: https://github.com/apache/druid/pull/10524#discussion_r569979916



##########
File path: 
server/src/main/java/org/apache/druid/indexing/overlord/supervisor/Supervisor.java
##########
@@ -64,4 +66,18 @@ default Boolean isHealthy()
    * @param checkpointMetadata metadata for the sequence to currently 
checkpoint
    */
   void checkpoint(int taskGroupId, DataSourceMetadata checkpointMetadata);
+
+  /**
+   * Collect maxLag, totalLag, avgLag into ArrayList<Long> lags
+   * Only support Kafka ingestion so far.
+   * @param lags , Notice : The order of values is maxLag, totalLag and avgLag.
+   */
+  void collectLag(ArrayList<Long> lags);

Review comment:
       Ya, for now, we only support Kafka autoScaler. But based on 
`https://github.com/apache/druid/blob/118b50195e5c2989e04e0f5290aa72cae114db39/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java#L3499`.
 It   may be not hard to support kinesis autoscaler. And I'am glad to  work on 
it after this pr merged. So maybe keep the code abstract is more meaningful and 
there are plenty preparation to ensure that users will not set kinesis auto 
scale by accident:
   1. Docs mention
   2. `throw new UnsupportedOperationException("Tasks auto scaler for kinesis 
is not supported yet. Please remove autoscalerConfig or set it null!");` in 
`KinesisSupervisorIOConfig`
   3. set `autoscalerConfig = null` when `super(xxx)` in 
`KinesisSupervisorIOConfig`
   
   Also we can't cast Supervisor to KafkaSupervisor unless add an extra 
dependency `druid-kafka-indexing-service` in `indexing-service` module.




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