[ 
https://issues.apache.org/jira/browse/BEAM-1589?focusedWorklogId=419838&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-419838
 ]

ASF GitHub Bot logged work on BEAM-1589:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 09/Apr/20 22:24
            Start Date: 09/Apr/20 22:24
    Worklog Time Spent: 10m 
      Work Description: reuvenlax commented on pull request #11350: [BEAM-1589] 
Added @onWindowExpiration annotation.
URL: https://github.com/apache/beam/pull/11350#discussion_r406508479
 
 

 ##########
 File path: 
runners/core-java/src/main/java/org/apache/beam/runners/core/DoFnRunner.java
 ##########
 @@ -52,6 +52,12 @@ void onTimer(
    */
   void finishBundle();
 
+  /**
+   * Calls a {@link DoFn DoFn's} {@link DoFn.OnWindowExpiration 
@OnWindowExpiration} method and
+   * performs additional task, such as extracts a value saved in a state 
before garbage collection.
+   */
+  void onWindowExpiration(BoundedWindow window, Instant timestamp, TimeDomain 
timeDomain);
 
 Review comment:
   What do timestamp and timeDomain mean in this context? 
   
   Also presumably you do want to be able to access the key in 
onWindowExpiration
 
----------------------------------------------------------------
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:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 419838)
    Time Spent: 2h 40m  (was: 2.5h)

> Add OnWindowExpiration method to Stateful DoFn
> ----------------------------------------------
>
>                 Key: BEAM-1589
>                 URL: https://issues.apache.org/jira/browse/BEAM-1589
>             Project: Beam
>          Issue Type: New Feature
>          Components: runner-core, sdk-java-core
>            Reporter: Jingsong Lee
>            Assignee: Shehzaad Nakhoda
>            Priority: Major
>          Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> See BEAM-1517
> This allows the user to do some work before the state's garbage collection.
> It seems kind of annoying, but on the other hand forgetting to set a final 
> timer to flush state is probably data loss most of the time.
> FlinkRunner does this work very simply, but other runners, such as 
> DirectRunner, need to traverse all the states to do this, and maybe it's a 
> little hard.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to