Efrat19 commented on code in PR #344:
URL:
https://github.com/apache/flink-connector-kafka/pull/344#discussion_r4659719271
##########
flink-connector-kafka/src/main/java/org/apache/flink/connector/kafka/dynamic/source/DynamicKafkaSourceBuilder.java:
##########
@@ -333,9 +333,9 @@ private void
warnIfOffsetResetStrategyOpposesStartingOffsetsInitializer() {
configuredOffsetResetStrategy, startingOffsetsInitializer)) {
logger.warn(
"Configured {}={} differs from the {} strategy derived
from the starting "
- + "offsets initializer. The source will use the
initializer for "
- + "startup, but Kafka may reset to {} if an
initialized offset "
- + "becomes unavailable.",
+ + "offsets initializer. Kafka will reset to {} if
a starting "
Review Comment:
`SpecifiedOffsetsInitializer` and `TimestampOffsetsInitializer` will
fallback to a (possibly) different reset strategy than the
`configuredOffsetReset`
##########
flink-connector-kafka/src/main/java/org/apache/flink/connector/kafka/source/enumerator/initializer/OffsetsInitializer.java:
##########
@@ -111,7 +113,8 @@ static OffsetsInitializer committedOffsets() {
/**
* Get an {@link OffsetsInitializer} which initializes the offsets to the
committed offsets. Use
* the given {@link OffsetResetStrategy} to initialize the offsets if the
committed offsets does
- * not exist.
+ * not exist. An explicitly configured {@code auto.offset.reset} on the
source takes precedence
+ * over the given strategy.
Review Comment:
Update PyFlink docstrings as well?
(`flink-python/pyflink/datastream/connectors/kafka.py`)
##########
flink-connector-kafka/src/main/java/org/apache/flink/connector/kafka/source/KafkaSourceBuilder.java:
##########
@@ -493,9 +493,9 @@ private void parseAndSetRequiredProperties() {
configuredOffsetResetStrategy,
startingOffsetsInitializer)) {
LOG.warn(
"Configured {}={} differs from the {} strategy derived
from the starting "
- + "offsets initializer. The source will use
the initializer for "
- + "startup, but Kafka may reset to {} if an
initialized offset "
- + "becomes unavailable.",
+ + "offsets initializer. Kafka will reset to {}
if a starting "
Review Comment:
I'd consider unifying both logs text - maybe in OffsetsInitializerValidator
/ other static util? to avoid repetition, + calculate the correct fallback
strategy, wdyt?
--
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]