What would you like to happen?
Stateful DoFns which use looping timers in ProcessTime domain need to clear the timers in order for the pipeline to drain properly when running using Dataflow runner. The only way now to detect the pipeline drain event is by defining a method annotated with @onWindowExpiration.
The documentation here states that this method can take the same parameters as the method annotated with @ontimer. But timer-related parameters are not allowed because there are not on the allow-list
The workaround is not complex - using a dedicated or some other state pointer, setting up the state to some value, clearing the state in the onWindowExpiration() and not setting the timer if the state is null, but it's not well known and adds unneeded complexity.
Issue Priority
Priority: 2 (default / most feature requests should be filed as P2)
Issue Components
What would you like to happen?
Stateful DoFns which use looping timers in ProcessTime domain need to clear the timers in order for the pipeline to drain properly when running using Dataflow runner. The only way now to detect the pipeline drain event is by defining a method annotated with @onWindowExpiration.
The documentation here states that this method can take the same parameters as the method annotated with @ontimer. But timer-related parameters are not allowed because there are not on the allow-list
The workaround is not complex - using a dedicated or some other state pointer, setting up the state to some value, clearing the state in the onWindowExpiration() and not setting the timer if the state is null, but it's not well known and adds unneeded complexity.
Issue Priority
Priority: 2 (default / most feature requests should be filed as P2)
Issue Components