Hi, I am building a Flink application that compute...
# troubleshooting
r
Hi, I am building a Flink application that computes tumbling windows from a stream of data. What are my options for accessing data computed from a previous tumbling window in the next one? My current approach involves a global
MapState
, but I'm wondering if there are any better approaches
Some more context: we are processing a binary signal, and would like to compute how many times the binary state transitions from 0 to 1 or 1 to 0 within each window. To interpret the signal from the beginning of window N, we need to have knowledge of the last signal received in window N-1. e.g. if the first signal in window N reflects a 0, whether or not we interpret this as a state change depends on whether the last signal in window N-1 is 0 or 1.
a
I may be wrong, but I would question if you’re trying to use tumbling windows wrong. Maybe you could use a sliding window.
s
^ Exactly, or just state with timers