OmniaGM commented on code in PR #12577:
URL: https://github.com/apache/kafka/pull/12577#discussion_r991564315
##########
connect/mirror-client/src/main/java/org/apache/kafka/connect/mirror/MirrorClientConfig.java:
##########
@@ -69,6 +74,17 @@ public ReplicationPolicy replicationPolicy() {
return getConfiguredInstance(REPLICATION_POLICY_CLASS,
ReplicationPolicy.class);
}
+ @SuppressWarnings("unchecked")
+ ForwardingAdmin getForwardingAdmin(Map<String, Object> config) {
+ try {
+ return Utils.newParameterizedInstance(
Review Comment:
`getConfiguredInstance` works only with `Configurable` the problem with
using `Configurable` for this case in my opinion is that it doesn't force
inheriting the superclass initializing behaviour.
In the case, the behaviour we want all extended classes to inherit is the
initializing of the `delegate = Admin.create(config)` so I used
`Utils.newParameterizedInstance`
##########
connect/mirror/src/main/java/org/apache/kafka/connect/mirror/MirrorSourceConnector.java:
##########
@@ -17,6 +17,8 @@
package org.apache.kafka.connect.mirror;
import java.util.Map.Entry;
+
+import org.apache.kafka.clients.admin.ForwardingAdmin;
Review Comment:
Fixed this to `Admin` instead of `ForwardingAdmin`
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]