rhauch commented on a change in pull request #9780:
URL: https://github.com/apache/kafka/pull/9780#discussion_r570648556



##########
File path: 
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/DistributedHerder.java
##########
@@ -185,16 +188,33 @@
 
     private final DistributedConfig config;
 
+    /**
+     * Create a herder that will form a Connect cluster with other {@link 
DistributedHerder} instances (in this or other JVMs)
+     * that have the same group ID.
+     *
+     * @param config             the configuration for the worker; may not be 
null
+     * @param time               the clock to use; may not be null
+     * @param worker             the {@link Worker} instance to use; may not 
be null
+     * @param kafkaClusterId     the identifier of the Kafka cluster to use 
for internal topics; may not be null
+     * @param statusBackingStore the backing store for statuses; may not be 
null
+     * @param configBackingStore the backing store for connector 
configurations; may not be null
+     * @param restUrl            the URL of this herder's REST API; may not be 
null
+     * @param connectorClientConfigOverridePolicy the policy specifying the 
client configuration properties that may be overridden
+     *                                            in connector configurations; 
may not be null
+     * @param uponShutdown       any {@link AutoCloseable} objects that should 
be closed when this herder is {@link #stop() stopped},
+     *                           after all services and resources owned by 
this herder are stopped
+     */
     public DistributedHerder(DistributedConfig config,
                              Time time,
                              Worker worker,
                              String kafkaClusterId,
                              StatusBackingStore statusBackingStore,
                              ConfigBackingStore configBackingStore,
                              String restUrl,
-                             ConnectorClientConfigOverridePolicy 
connectorClientConfigOverridePolicy) {
+                             ConnectorClientConfigOverridePolicy 
connectorClientConfigOverridePolicy,
+                             AutoCloseable... uponShutdown) {

Review comment:
       The reason I used a variadic array here was to avoid having to create a 
new connector when no `AutoCloseable` instances are supplied. If we use a List, 
then we can change the usage in Connect runtime and in MirrorMaker 2, but 
anywhere else will break without keeping the old signature. WDYT?




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to