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

Are trigger registered timers maintained by window operator or not #6

Open
bithw1 opened this issue Dec 17, 2020 · 0 comments
Open

Comments

@bithw1
Copy link

bithw1 commented Dec 17, 2020

Hi,

I have quoted the following paragraphs from the streaming with flink book,

It says that the timers registered by the trigger are maintained by window operator
At the end,it says that registered trigger timers are not cleared because this state is opaque to the window operator.

The two sentences are contradictory, I would which one is correct? Thanks.

A trigger can register timers to be called back at certain points in
time—for example, to evaluate a window or purge its contents.
These timers are maintained by the window operator

Custom-defined state in a trigger
A trigger can define and use custom, per-window and per-key state.
This state is completely controlled by the trigger and not
maintained by the window operator.
The window operator deletes a window when the end time of the
window, defined by the end timestamp of the window object, is
reached. Whether this happens with processing-time or event-time
semantics depends on the value returned by the
WindowAssigner.isEventTime() method.
When a window is deleted, the window operator automatically clears
the window content and discards the window object. Custom-defined
trigger state and registered trigger timers are not cleared because this
state is opaque to the window operator
. Hence, a trigger must clear all
of its state in the Trigger.clear() method to prevent leaking
state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant