github-advanced-security[bot] commented on code in PR #19097:
URL: https://github.com/apache/druid/pull/19097#discussion_r2892206389
##########
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/autoscaler/CostBasedAutoScaler.java:
##########
@@ -99,12 +103,20 @@
this.costFunction = new WeightedCostFunction();
this.autoscalerExecutor =
Execs.scheduledSingleThreaded("CostBasedAutoScaler-"
+
StringUtils.encodeForFormat(spec.getId()));
- this.metricBuilder = ServiceMetricEvent.builder()
-
.setDimension(DruidMetrics.SUPERVISOR_ID, supervisorId)
- .setDimension(
- DruidMetrics.STREAM,
-
this.supervisor.getIoConfig().getStream()
- );
+ this.metricBuilder =
+ ServiceMetricEvent.builder()
+ .setDimension(DruidMetrics.SUPERVISOR_ID,
supervisorId)
+ .setDimension(
+ DruidMetrics.DATASOURCE,
+ CollectionUtils.getOnlyElement(
+ spec.getDataSources(),
+ xs -> DruidException.defensive("Expected one
dataSource, got[%s]")
Review Comment:
## Missing format argument
This format call refers to 1 argument(s) but only supplies 0 argument(s).
[Show more
details](https://github.com/apache/druid/security/code-scanning/10860)
##########
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/autoscaler/LagBasedAutoScalerConfig.java:
##########
@@ -186,7 +188,16 @@
@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]")
Review Comment:
## Missing format argument
This format call refers to 1 argument(s) but only supplies 0 argument(s).
[Show more
details](https://github.com/apache/druid/security/code-scanning/10861)
--
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]