github-advanced-security[bot] commented on code in PR #18036:
URL: https://github.com/apache/druid/pull/18036#discussion_r2110603780
##########
extensions-core/kafka-indexing-service/src/main/java/org/apache/druid/indexing/kafka/supervisor/KafkaSupervisor.java:
##########
@@ -120,12 +123,46 @@
this.spec = spec;
this.pattern = getIoConfig().isMultiTopic() ?
Pattern.compile(getIoConfig().getStream()) : null;
+
+ if (getIoConfig().isMultiCluster()) {
+ int idx = 0;
+ final Map<String, Object> consumerProperties =
getIoConfig().getConsumerProperties();
+ final ImmutableMap.Builder<String, Integer> clusterIndices = new
ImmutableMap.Builder<>();
+ final List<String> sortedClusters =
consumerProperties.keySet().stream().sorted().collect(Collectors.toList());
+ for (final String cluster : sortedClusters) {
+ clusterIndices.put(cluster, idx++);
+ }
+ this.clusterIndices = clusterIndices.build();
+ } else {
+ this.clusterIndices = ImmutableMap.of();
+ }
}
@Override
protected RecordSupplier<KafkaTopicPartition, Long, KafkaRecordEntity>
setupRecordSupplier()
{
+ final KafkaSupervisorIOConfig ioConfig = spec.getIoConfig();
Review Comment:
## Deprecated method or constructor invocation
Invoking [KafkaSupervisorSpec.getIoConfig](1) should be avoided because it
has been deprecated.
[Show more
details](https://github.com/apache/druid/security/code-scanning/9201)
--
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]