rhauch commented on a change in pull request #10549: URL: https://github.com/apache/kafka/pull/10549#discussion_r617008391
########## File path: connect/runtime/src/main/java/org/apache/kafka/connect/runtime/isolation/DelegatingClassLoader.java ########## @@ -208,6 +220,21 @@ protected void initLoaders() { // Finally add parent/system loader. initPluginLoader(CLASSPATH_NAME); addAllAliases(); + reportPluginConflicts(); + } + + //visible for testing + Set<String> reportPluginConflicts() { + return allAddedPlugins.entrySet().stream().filter(e -> e.getValue().size() > 1).map(e -> { + String pluginClassName = e.getKey(); + PluginDesc<?> usedPluginDesc = usedPluginDesc(pluginClassName); + List<PluginDesc<?>> ignoredPlugins = new ArrayList<>(e.getValue()); + ignoredPlugins.remove(usedPluginDesc); + log.warn("Detected multiple plugins contain '{}'; using plugin {} and ignoring {} plugins ({}). " + + "Check the installation on all workers and if possible remove all but one of these duplicated plugins.", + pluginClassName, usedPluginDesc, ignoredPlugins.size(), ignoredPlugins); Review comment: Indentation is incorrect. It should be: ```suggestion log.warn("Detected multiple plugins contain '{}'; using plugin {} and ignoring {} plugins ({}). " + "Check the installation on all workers and if possible remove all but one of these duplicated plugins.", pluginClassName, usedPluginDesc, ignoredPlugins.size(), ignoredPlugins); ``` -- 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