gharris1727 commented on code in PR #17741:
URL: https://github.com/apache/kafka/pull/17741#discussion_r1871820993


##########
connect/runtime/src/main/java/org/apache/kafka/connect/util/PluginVersionUtils.java:
##########
@@ -0,0 +1,186 @@
+package org.apache.kafka.connect.util;
+
+import org.apache.kafka.common.config.ConfigDef;
+import org.apache.kafka.common.config.ConfigException;
+import org.apache.kafka.connect.connector.Connector;
+import org.apache.kafka.connect.runtime.ConnectorConfig;
+import org.apache.kafka.connect.runtime.isolation.PluginDesc;
+import org.apache.kafka.connect.runtime.isolation.Plugins;
+import org.apache.kafka.connect.runtime.rest.entities.ConnectorType;
+import 
org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
+import org.apache.maven.artifact.versioning.VersionRange;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.function.Function;
+import java.util.function.Supplier;
+import java.util.stream.Collectors;
+
+public class PluginVersionUtils {
+
+    private static Plugins plugins = null;

Review Comment:
   The EmbeddedConnectCluster creates one worker, which instantiates `new 
Plugins`, and then sets the PluginVersionUtils to that instance.
   
   The EmbeddedConnectCluster creates another worker, which instantiates `new 
Plugins`, and then overwrites the field in PluginVersionUtils.
   
   The first worker and the second worker use all of the same Recommender 
instances and the same Plugins instances, even though they could be started 
with completely different plugin.path.



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to