Naireen commented on code in PR #32344:
URL: https://github.com/apache/beam/pull/32344#discussion_r1755209125
##########
sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaIO.java:
##########
@@ -1697,11 +1696,17 @@ public PCollection<KafkaRecord<K, V>> expand(PBegin
input) {
}
if (kafkaRead.isRedistributed()) {
- // fail here instead.
- checkArgument(
- kafkaRead.isCommitOffsetsInFinalizeEnabled(),
- "commitOffsetsInFinalize() can't be enabled with
isRedistributed");
+ if (kafkaRead.isCommitOffsetsInFinalizeEnabled()) {
+ LOG.warn(
+ "commitOffsetsInFinalize() will not capture all work processed
if set with withRedistribute()");
+ }
+ if (Boolean.TRUE.equals(
+
kafkaRead.getConsumerConfig().get(ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG))) {
+ LOG.warn(
+ "config.ENABLE_AUTO_COMMIT_CONFIG doesn't need to be set with
withRedistribute()");
Review Comment:
Ack, removed it.
##########
sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaIO.java:
##########
@@ -1697,11 +1696,17 @@ public PCollection<KafkaRecord<K, V>> expand(PBegin
input) {
}
if (kafkaRead.isRedistributed()) {
- // fail here instead.
- checkArgument(
- kafkaRead.isCommitOffsetsInFinalizeEnabled(),
- "commitOffsetsInFinalize() can't be enabled with
isRedistributed");
+ if (kafkaRead.isCommitOffsetsInFinalizeEnabled()) {
+ LOG.warn(
+ "commitOffsetsInFinalize() will not capture all work processed
if set with withRedistribute()");
+ }
+ if (Boolean.TRUE.equals(
Review Comment:
Yeah, it occurs a few more times in this file as well.
--
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]