Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: Add the ability to cancel timers in methods annotated with @onWindowExpiration #33595

Open
1 of 17 tasks
slilichenko opened this issue Jan 14, 2025 · 0 comments

Comments

@slilichenko
Copy link
Contributor

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

  • Component: Python SDK
  • Component: Java SDK
  • Component: Go SDK
  • Component: Typescript SDK
  • Component: IO connector
  • Component: Beam YAML
  • Component: Beam examples
  • Component: Beam playground
  • Component: Beam katas
  • Component: Website
  • Component: Infrastructure
  • Component: Spark Runner
  • Component: Flink Runner
  • Component: Samza Runner
  • Component: Twister2 Runner
  • Component: Hazelcast Jet Runner
  • Component: Google Cloud Dataflow Runner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant