kfaraz commented on code in PR #19097:
URL: https://github.com/apache/druid/pull/19097#discussion_r2894360148
##########
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/autoscaler/LagBasedAutoScalerConfig.java:
##########
@@ -186,7 +188,16 @@ public Integer getTaskCountStart()
@Override
public SupervisorTaskAutoScaler createAutoScaler(Supervisor supervisor,
SupervisorSpec spec, ServiceEmitter emitter)
{
- return new LagBasedAutoScaler((SeekableStreamSupervisor) supervisor,
spec.getId(), this, spec, emitter);
+ return new LagBasedAutoScaler(
+ (SeekableStreamSupervisor) supervisor,
+ CollectionUtils.getOnlyElement(
+ spec.getDataSources(),
+ xs -> DruidException.defensive("Expected one dataSource, got[%s]",
xs)
+ ),
Review Comment:
I think we can skip passing the `dataSource` here and just extract it from
the `spec` inside the `LagBasedAutoScaler`.
--
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]