hardshah commented on code in PR #30141:
URL: https://github.com/apache/beam/pull/30141#discussion_r1473059114
##########
runners/flink/src/main/java/org/apache/beam/runners/flink/translation/wrappers/streaming/io/source/unbounded/FlinkUnboundedSourceReader.java:
##########
@@ -103,22 +104,23 @@ public void start() {
createPendingBytesGauge(context);
Long watermarkInterval =
pipelineOptions.as(FlinkPipelineOptions.class).getAutoWatermarkInterval();
- if (watermarkInterval != null) {
- scheduleTaskAtFixedRate(
- () -> {
- // Set the watermark emission flag first.
- shouldEmitWatermark = true;
- // Wake up the main thread if necessary.
- CompletableFuture<Void> f = dataAvailableFutureRef.get();
- if (f != DUMMY_FUTURE) {
- f.complete(null);
- }
- },
- watermarkInterval,
- watermarkInterval);
- } else {
- LOG.warn("AutoWatermarkInterval is not set, watermarks won't be
emitted.");
+ if (watermarkInterval == null) {
+ watermarkInterval = DEFAULT_WATERMARK_EMIT_INTERVAL_MS;
Review Comment:
Thanks for the feedback. I think I've fixed this now.
--
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]