scwhittle commented on code in PR #32344:
URL: https://github.com/apache/beam/pull/32344#discussion_r1758395798


##########
sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaIO.java:
##########
@@ -1696,7 +1696,7 @@ public PCollection<KafkaRecord<K, V>> expand(PBegin 
input) {
         }
 
         if (kafkaRead.isRedistributed()) {
-          if (kafkaRead.isCommitOffsetsInFinalizeEnabled()) {
+          if (kafkaRead.isCommitOffsetsInFinalizeEnabled() && 
kafkaRead.isAllowDuplicates()) {
             LOG.warn(
                 "Offsets committed due to usage of commitOffsetsInFinalize() 
may not capture all work processed due to use of withRedistribute()");

Review Comment:
   update the log to reflect allow duplicates.



##########
sdks/java/io/kafka/src/test/java/org/apache/beam/sdk/io/kafka/KafkaIOTest.java:
##########
@@ -648,6 +669,29 @@ public void 
testCommitOffsetsInFinalizeAndRedistributeWarnings() {
         "Offsets committed due to usage of commitOffsetsInFinalize() may not 
capture all work processed due to use of withRedistribute()");
   }
 
+  @Test
+  public void 
testCommitOffsetsInFinalizeAndRedistributeNoWarningsWithAllowDuplicates() {

Review Comment:
   seems like it should be NoWarningsWith*No*AllowDuplicates



-- 
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: github-unsubscr...@beam.apache.org

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

Reply via email to