You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2020/09/02 13:50:52 UTC

[GitHub] [beam] je-ik commented on a change in pull request #12759: [BEAM-10760] Generalize state cleanup optimization for global window

je-ik commented on a change in pull request #12759:
URL: https://github.com/apache/beam/pull/12759#discussion_r482084426



##########
File path: runners/flink/src/main/java/org/apache/beam/runners/flink/translation/wrappers/streaming/DoFnOperator.java
##########
@@ -1330,6 +1338,19 @@ public void setTimer(
     @Deprecated
     @Override
     public void setTimer(TimerData timer) {
+      if (timer.getTimestamp().isAfter(GlobalWindow.INSTANCE.maxTimestamp())) {

Review comment:
       Could we do this using CleanupTimer? Something like
   ```java
         StatefulDoFnRunner.CleanupTimer cleanupTimer =
             new StatefulDoFnRunner.TimeInternalsCleanupTimer(timerInternals, windowingStrategy) {
               @Override
               public void setForWindow(Object input, BoundedWindow window) {
                 if (!window.equals(GlobalWindow.INSTANCE)) {
                   super.setForWindow(input, window);
                 }
               }
             };
   ```
   in DoFnOperator:317




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