You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by da...@apache.org on 2022/06/13 08:23:26 UTC

[flink] branch release-1.15 updated: [FLINK-27890][examples] Fix the bug introduced By [FLINK-19317] to use the return result after assignTimestampsAndWatermarks

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

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


The following commit(s) were added to refs/heads/release-1.15 by this push:
     new 6fcec2cf464 [FLINK-27890][examples] Fix the bug introduced By [FLINK-19317] to use the return result after assignTimestampsAndWatermarks
6fcec2cf464 is described below

commit 6fcec2cf464f0467c3bb5ca3d249ac3ac754820a
Author: coderap <su...@gmail.com>
AuthorDate: Sun Jun 5 11:44:01 2022 +0800

    [FLINK-27890][examples] Fix the bug introduced By [FLINK-19317] to use the return result after assignTimestampsAndWatermarks
---
 .../flink/streaming/examples/sideoutput/SideOutputExample.java       | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/flink-examples/flink-examples-streaming/src/main/java/org/apache/flink/streaming/examples/sideoutput/SideOutputExample.java b/flink-examples/flink-examples-streaming/src/main/java/org/apache/flink/streaming/examples/sideoutput/SideOutputExample.java
index e72804ba640..8576fb4bef4 100644
--- a/flink-examples/flink-examples-streaming/src/main/java/org/apache/flink/streaming/examples/sideoutput/SideOutputExample.java
+++ b/flink-examples/flink-examples-streaming/src/main/java/org/apache/flink/streaming/examples/sideoutput/SideOutputExample.java
@@ -84,10 +84,11 @@ public class SideOutputExample {
         // We assign the WatermarkStrategy after creating the source. In a real-world job you
         // should integrate the WatermarkStrategy in the source. The Kafka source allows this,
         // for example.
-        text.assignTimestampsAndWatermarks(IngestionTimeWatermarkStrategy.create());
+        SingleOutputStreamOperator<String> textWithTimestampAndWatermark =
+                text.assignTimestampsAndWatermarks(IngestionTimeWatermarkStrategy.create());
 
         SingleOutputStreamOperator<Tuple2<String, Integer>> tokenized =
-                text.process(new Tokenizer());
+                textWithTimestampAndWatermark.process(new Tokenizer());
 
         DataStream<String> rejectedWords =
                 tokenized