flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [flink] rmetzger commented on a change in pull request #15728: [FLINK-22379][runtime] CheckpointCoordinator checks the state of all …
Date Tue, 11 May 2021 05:33:33 GMT

rmetzger commented on a change in pull request #15728:
URL: https://github.com/apache/flink/pull/15728#discussion_r629857371



##########
File path: flink-libraries/flink-state-processing-api/src/test/java/org/apache/flink/state/api/SavepointWindowReaderITCase.java
##########
@@ -348,24 +359,30 @@ public void testApplyWindowStateReader() throws Exception {
     public void testApplyEvictorWindowStateReader() throws Exception {
         String savepointPath =
                 takeSavepoint(
-                        numbers,
-                        source -> {
+                        WaitingWindowAssigner.wrap(
+                                TumblingEventTimeWindows.of(Time.milliseconds(10))),
+                        (windowAssigner) -> {
                             StreamExecutionEnvironment env =
                                     StreamExecutionEnvironment.getExecutionEnvironment();
                             env.setStateBackend(getStateBackend());
                             env.setParallelism(4);
 
-                            env.addSource(source)
-                                    .rebalance()
-                                    .assignTimestampsAndWatermarks(
-                                            WatermarkStrategy.<Integer>noWatermarks()
-                                                    .withTimestampAssigner((event, timestamp)
-> 0))
-                                    .keyBy(id -> id)
-                                    .window(TumblingEventTimeWindows.of(Time.milliseconds(10)))
-                                    .evictor(new NoOpEvictor<>())
-                                    .apply(new NoOpWindowFunction())
-                                    .uid(uid)
-                                    .addSink(new DiscardingSink<>());
+                            try {
+                                env.addSource(createSource(numbers))
+                                        .rebalance()
+                                        .assignTimestampsAndWatermarks(
+                                                WatermarkStrategy.<Integer>noWatermarks()
+                                                        .withTimestampAssigner(
+                                                                (event, timestamp) ->
0))
+                                        .keyBy(id -> id)
+                                        .window(windowAssigner)
+                                        .evictor(new NoOpEvictor<>())
+                                        .apply(new NoOpWindowFunction())
+                                        .uid(uid)
+                                        .addSink(new DiscardingSink<>());
+                            } catch (Exception e) {
+                                e.printStackTrace();
+                            }

Review comment:
       Thanks a lot!




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message