Hi Nhan,
Logically, the total number of processed events before an event cannot
be accurately calculated unless events processing are synchronized.
This is not scalable, so naturally I don't think Flink supports it.
Although, I suppose you can get an approximate count by using a
non-keyed TumblingWindow, count the item inside the window, then use
that value in the next window.
Regards,
Kien
On 1/21/2019 9:34 PM, Thanh-Nhan Vo wrote:
Hello all,
I have a question, please !
I’m using Flink 1.6 to process our data in streaming mode.
I wonder if at a given event, there is a way to get the current total
number of processed events (before this event).
If possible, I want to get this total number of processed events as a
value state in Keystream.
It means that for a given key in KeyStream, I want to retrieve not
only the total number of processed events for this key but also the
total number of processed events for all keys.
There is a way to do this in Flink 1.6, please!
Best regard,
Nhan