You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "wuzhenhua01 (via GitHub)" <gi...@apache.org> on 2023/03/21 07:33:03 UTC

[GitHub] [hudi] wuzhenhua01 commented on a diff in pull request #8227: [HUDI-5952] Fix NPE when use kafka callback

wuzhenhua01 commented on code in PR #8227:
URL: https://github.com/apache/hudi/pull/8227#discussion_r1142977268


##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/callback/kafka/HoodieWriteCommitKafkaCallback.java:
##########
@@ -85,10 +85,10 @@ public KafkaProducer<String, String> createProducer(HoodieConfig hoodieConfig) {
     kafkaProducerProps.setProperty(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, bootstrapServers);
     // default "all" to ensure no message loss
     kafkaProducerProps.setProperty(ProducerConfig.ACKS_CONFIG, hoodieConfig
-        .getString(ACKS));
+        .getStringOrDefault(ACKS));
     // retries 3 times by default
     kafkaProducerProps.setProperty(ProducerConfig.RETRIES_CONFIG, hoodieConfig
-        .getString(RETRIES));
+        .getStringOrDefault(RETRIES));

Review Comment:
   yep



-- 
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: commits-unsubscribe@hudi.apache.org

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