apache / apache/beam

Unable to cancel a DoFn Timer

Open
#19,505 0 comments 0 reactions 0 assignees View on GitHub
beam-model bug P3
Dominant language
Java
Stars
8.7k
Forks
4.7k
Avg merge
1d 20h
Merged PRs (30d)
196

Description

The following was raised on [Stackoverflow]([https://stackoverflow.com/questions/55875832/how-to-cancel-unset-a-dofn-defined-timer)]:

 

Having read [Timely (and Stateful) Processing with Apache Beam](https://beam.apache.org/blog/2017/08/28/timely-processing.html) and looked at the JavaDoc for a [Timer](https://beam.apache.org/releases/javadoc/2.12.0/org/apache/beam/sdk/state/Timer.html), I have successfully setup a timer to be fired. However, I am missing how to request that a timer be cancelled before it has fired. Is this a semantic that is possible / allowable in Beam architecture?

My back-story is that I wish to register a timer to fire a callback if something has not occurred ... but if it HAS occurred prior to the timer firing, then I wish to cancel the timer from being fired.

Imported from Jira [BEAM-7167](https://issues.apache.org/jira/browse/BEAM-7167). Original Jira may contain additional context.
Reported by: kolban.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.