becketqin commented on a change in pull request #14531:
URL: https://github.com/apache/flink/pull/14531#discussion_r587183656
##########
File path:
flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/connector/kafka/source/KafkaSourceBuilder.java
##########
@@ -423,14 +430,15 @@ private void parseAndSetRequiredProperties() {
startingOffsetsInitializer.getAutoOffsetResetStrategy().name().toLowerCase(),
true);
- // If the source is bounded, do not run periodic partition discovery.
- if (maybeOverride(
- KafkaSourceOptions.PARTITION_DISCOVERY_INTERVAL_MS.key(),
- "-1",
- boundedness == Boundedness.BOUNDED)) {
- LOG.warn(
- "{} property is overridden to -1 because the source is
bounded.",
- KafkaSourceOptions.PARTITION_DISCOVERY_INTERVAL_MS);
+ // If the source is bounded or stoppingOffsetsInitializer is
specified, do not run periodic
Review comment:
Should we update the comments here as well? It probably should be
something like:
"We only disable the periodic partition discovery in the following cases:
1. The source is bounded.
2. The source has stopping offsets and there is no explicit partition
discovery interval setting."
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]