kumarpritam863 commented on code in PR #12583:
URL: https://github.com/apache/iceberg/pull/12583#discussion_r2044847781


##########
kafka-connect/kafka-connect/src/main/java/org/apache/iceberg/connect/channel/KafkaClientFactory.java:
##########
@@ -40,25 +42,88 @@ class KafkaClientFactory {
     this.kafkaProps = kafkaProps;
   }
 
+  @SuppressWarnings("unchecked")
   Producer<String, byte[]> createProducer(String transactionalId) {
     Map<String, Object> producerProps = Maps.newHashMap(kafkaProps);

Review Comment:
   I have used here producer and consumer properties to avoid class cast 
exception as ProducerProps already takes care of that and kafka props return 
string. This makes it less prone to errors.



##########
kafka-connect/kafka-connect/src/main/java/org/apache/iceberg/connect/channel/KafkaClientFactory.java:
##########
@@ -40,25 +42,88 @@ class KafkaClientFactory {
     this.kafkaProps = kafkaProps;
   }
 
+  @SuppressWarnings("unchecked")
   Producer<String, byte[]> createProducer(String transactionalId) {
     Map<String, Object> producerProps = Maps.newHashMap(kafkaProps);

Review Comment:
   I have used here producer and consumer properties to avoid class cast 
exception as ProducerProps already takes care of that and kafka props return 
string. This makes it less prone to errors.



-- 
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: issues-unsubscr...@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to