zhangyue19921010 commented on a change in pull request #10524:
URL: https://github.com/apache/druid/pull/10524#discussion_r569980981
##########
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);
+
+ /**
+ * use for autoscaler
+ */
+ Runnable buildDynamicAllocationTask(Callable<Integer> scaleAction);
Review comment:
Nice catch! I review the code and find out there is no need for this
`buildDynamicAllocationTask ` method in `Supervisor.java` and autoscaler can
build autoscale notice itself and supervisor will do scale action.
So I removed `buildDynamicAllocationTask` func in `Supervisor.java`
##########
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);
+
+ /**
+ * use for autoscaler
+ */
+ Runnable buildDynamicAllocationTask(Callable<Integer> scaleAction);
+
+ Map getSupervisorTaskInfos();
Review comment:
Sure. Changed.
----------------------------------------------------------------
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]