mimaison commented on a change in pull request #9313:
URL: https://github.com/apache/kafka/pull/9313#discussion_r505426022



##########
File path: 
connect/mirror/src/main/java/org/apache/kafka/connect/mirror/MirrorConnectorConfig.java
##########
@@ -199,6 +199,8 @@
 
     protected static final String SOURCE_CLUSTER_PREFIX = 
MirrorMakerConfig.SOURCE_CLUSTER_PREFIX;
     protected static final String TARGET_CLUSTER_PREFIX = 
MirrorMakerConfig.TARGET_CLUSTER_PREFIX;
+    protected static final String SOURCE_PREFIX = 
MirrorMakerConfig.SOURCE_PREFIX;
+    protected static final String TARGET_PREFIX = 
MirrorMakerConfig.TARGET_PREFIX;
     protected static final String PRODUCER_CLIENT_PREFIX = "producer.";
     protected static final String CONSUMER_CLIENT_PREFIX = "consumer.";
     protected static final String ADMIN_CLIENT_PREFIX = "admin.";

Review comment:
       We could get rid of `SOURCE_ADMIN_CLIENT_PREFIX` and 
`TARGET_ADMIN_CLIENT_PREFIX` and instead use `SOURCE_PREFIX + 
ADMIN_CLIENT_PREFIX` or `TARGET_PREFIX + ADMIN_CLIENT_PREFIX` in the method 
getting Admin Client configs so they are the similar to the Producer and 
Consumer methods

##########
File path: 
connect/mirror/src/main/java/org/apache/kafka/connect/mirror/MirrorMakerConfig.java
##########
@@ -245,10 +254,17 @@ public MirrorClientConfig clientConfig(String cluster) {
         Map<String, String> strings = originalsStrings();
         strings.keySet().removeIf(x -> !x.startsWith(prefix));
         return strings;
-    } 
+    }
+
+    static Map<String, String> prefixForGeneralAttrs(String prefix, 
Map<String, String> props) {

Review comment:
       Can we find a better name for these 2 new methods? Something like 
`clusterConfigsWithPrefix()` and `clientConfigsWithPrefix()`?




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