ivanyu commented on code in PR #6934:
URL: https://github.com/apache/kafka/pull/6934#discussion_r1587717243


##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/AbstractHerder.java:
##########
@@ -992,4 +992,15 @@ public List<String> setWorkerLoggerLevel(String namespace, 
String desiredLevelSt
         return loggers.setLevel(namespace, level);
     }
 
+    protected Map<String, String> applyConnectorConfigPatch(Map<String, 
String> currentConfig, Map<String, String> configPatch) {
+        Map<String, String> patchedConfig = new HashMap<>(currentConfig);
+        configPatch.forEach((k, v) -> {
+            if (v != null) {
+                patchedConfig.put(k, v);
+            } else {
+                patchedConfig.remove(k);
+            }
+        });
+        return patchedConfig;
+    }

Review Comment:
   I did this, extracted into `ConnectUtils` (because I think the `null` 
processing logic may be connect-specific) + added a unit test for this.



-- 
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