Klose6 commented on code in PR #187:
URL:
https://github.com/apache/cassandra-analytics/pull/187#discussion_r3083114332
##########
cassandra-analytics-cdc-sidecar/src/main/java/org/apache/cassandra/cdc/sidecar/SidecarCdcClient.java:
##########
@@ -61,11 +63,23 @@ public class SidecarCdcClient implements AutoCloseable
final ClientConfig config;
final SidecarClient sidecarClient;
final ICdcStats stats;
+ @NotNull
+ final Function<String, Integer> portResolver;
public SidecarCdcClient(ClientConfig clientConfig,
CdcSidecarInstancesProvider instancesProvider,
SecretsProvider secretsProvider,
ICdcStats cdcStats) throws IOException
+ {
+ this(clientConfig, instancesProvider, secretsProvider, cdcStats,
+ ignored -> clientConfig.effectivePort());
+ }
+
+ public SidecarCdcClient(ClientConfig clientConfig,
+ CdcSidecarInstancesProvider instancesProvider,
+ SecretsProvider secretsProvider,
+ ICdcStats cdcStats,
+ @NotNull Function<String, Integer> portResolver)
throws IOException
Review Comment:
sure, initially I think using the Function<String, Integer> is simpler and
avoid the extra dep on cassandra-analytics-common which the CassandraInstance
is located, but use CassandraInstance will make it consistent with the current
toSidecarInstance(), updated.
--
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]