spuru9 commented on code in PR #320:
URL:
https://github.com/apache/flink-connector-kafka/pull/320#discussion_r4136384215
##########
flink-connector-kafka/src/main/java/org/apache/flink/connector/kafka/dynamic/source/reader/DynamicKafkaSourceReader.java:
##########
@@ -123,7 +128,32 @@ public DynamicKafkaSourceReader(
KafkaRecordDeserializationSchema<T> deserializationSchema,
Properties properties,
OffsetsInitializer startingOffsetsInitializer) {
+ this(
+ readerContext,
+ deserializationSchema,
+ properties,
+ startingOffsetsInitializer,
+ SystemClock.getInstance());
+ }
+
+ /**
+ * Creates a reader that reads the current time through the given {@link
Clock}. Removed cluster
+ * retention deadlines are absolute timestamps that are written into
checkpoints, so the clock
+ * must report absolute time; production always passes {@link
SystemClock#getInstance()}. Tests
+ * pass a manual clock to drive retention expiry instead of racing the
wall clock.
+ *
+ * <p>Package-private rather than annotated {@code @VisibleForTesting}:
the annotation is itself
+ * non-public Flink API and would add a frozen ArchUnit violation, which
{@code
+ * archunit.properties} asks contributors to avoid.
+ */
Review Comment:
```suggestion
/**
* Creates a reader that reads the current time through the given {@link
Clock}. Removed cluster
* retention deadlines are absolute timestamps that are written into
checkpoints, so the clock
* must report absolute time; production always passes {@link
SystemClock#getInstance()}.
*/
```
ArchUnit paragraph explained in the PR, not needed in the code,
--
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]