You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "yashmayya (via GitHub)" <gi...@apache.org> on 2023/03/24 07:50:22 UTC

[GitHub] [kafka] yashmayya commented on a diff in pull request #13445: [KAFKA-14843] fix(connect): include base connector config to return

yashmayya commented on code in PR #13445:
URL: https://github.com/apache/kafka/pull/13445#discussion_r1147220918


##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/AbstractHerder.java:
##########
@@ -836,10 +836,19 @@ public List<ConfigKeyInfo> connectorPluginConfig(String pluginName) {
             Object plugin = p.newPlugin(pluginName);
             PluginType pluginType = PluginType.from(plugin.getClass());
             ConfigDef configDefs;
+            List<ConfigKeyInfo> results = new ArrayList<>();
             switch (pluginType) {
                 case SINK:
+                    for (ConfigDef.ConfigKey configKey : SinkConnectorConfig.configDef().configKeys().values()) {
+                        results.add(AbstractHerder.convertConfigKey(configKey));
+                    }
+                    configDefs = ((SinkConnector) plugin).config();
+                    break;
                 case SOURCE:
-                    configDefs = ((Connector) plugin).config();
+                    for (ConfigDef.ConfigKey configKey : SinkConnectorConfig.configDef().configKeys().values()) {

Review Comment:
   ```suggestion
                       for (ConfigDef.ConfigKey configKey : SourceConnectorConfig.configDef().configKeys().values()) {
   ```



-- 
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-unsubscribe@kafka.apache.org

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