an2x commented on code in PR #35644:
URL: https://github.com/apache/beam/pull/35644#discussion_r2325339847


##########
sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaWriteSchemaTransformProvider.java:
##########
@@ -161,13 +168,58 @@ public void finish() {
       }
     }
 
+    public static class RecordErrorCounterFn extends DoFn<Row, KV<byte[], 
GenericRecord>> {

Review Comment:
   There seems to be a lot of duplication between this class and ErrorCounterFn.
   At first glance, it seems that it can be easily generalized by introducing 
generics (add a generic class `extends DoFn<Row, KV<byte[], T>>` and 2 others 
extending it).



##########
sdks/java/io/kafka/build.gradle:
##########
@@ -74,6 +74,7 @@ dependencies {
   implementation (group: 'com.google.cloud.hosted.kafka', name: 
'managed-kafka-auth-login-handler', version: '1.0.5') {
     // "kafka-clients" has to be provided since user can use its own version.
     exclude group: 'org.apache.kafka', module: 'kafka-clients'
+    exclude group: "io.confluent", module: "kafka-schema-registry-client"

Review Comment:
   Can you please add a comment explaining why this exclusion is needed? 
Similar to kafka-clients above.



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

Reply via email to