This is an automated email from the ASF dual-hosted git repository.

pnowojski pushed a commit to branch release-1.20
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/release-1.20 by this push:
     new 0c5af25063c (1.19 and 1.20 only) fixup! [FLINK-35886][task] Use 
RelativeClock in WatermarksWithIdleness
0c5af25063c is described below

commit 0c5af25063cb2e6b94f2e74ce7e7177fc5ed0c24
Author: Piotr Nowojski <[email protected]>
AuthorDate: Tue Aug 27 11:16:52 2024 +0200

    (1.19 and 1.20 only) fixup! [FLINK-35886][task] Use RelativeClock in 
WatermarksWithIdleness
---
 .../flink/api/common/eventtime/WatermarkGeneratorSupplier.java    | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git 
a/flink-core/src/main/java/org/apache/flink/api/common/eventtime/WatermarkGeneratorSupplier.java
 
b/flink-core/src/main/java/org/apache/flink/api/common/eventtime/WatermarkGeneratorSupplier.java
index 4d149d39259..9bf861b5717 100644
--- 
a/flink-core/src/main/java/org/apache/flink/api/common/eventtime/WatermarkGeneratorSupplier.java
+++ 
b/flink-core/src/main/java/org/apache/flink/api/common/eventtime/WatermarkGeneratorSupplier.java
@@ -21,6 +21,7 @@ package org.apache.flink.api.common.eventtime;
 import org.apache.flink.annotation.PublicEvolving;
 import org.apache.flink.metrics.MetricGroup;
 import org.apache.flink.util.clock.RelativeClock;
+import org.apache.flink.util.clock.SystemClock;
 
 import java.io.Serializable;
 
@@ -61,8 +62,13 @@ public interface WatermarkGeneratorSupplier<T> extends 
Serializable {
          * WatermarkGenerator} could not have been executed due to execution 
being blocked by the
          * runtime. For example a backpressure or watermark alignment blocking 
the progress.
          *
+         * <p>The default implementation that returns {@link SystemClock} is 
only for 1.19 and 1.20
+         * release to keep binary compatibility of the user's code.
+         *
          * @see RelativeClock
          */
-        RelativeClock getInputActivityClock();
+        default RelativeClock getInputActivityClock() {
+            return SystemClock.getInstance();
+        }
     }
 }

Reply via email to