Re: Guaranteeing event order in a KeyedProcessFunction

2021-05-10 Thread Miguel Araújo
I've realized this is not such a big issue because it's also upper bounded by the number of watermarks received, and it won't be one per event. Miguel Araújo escreveu no dia segunda, 10/05/2021 à(s) 09:39: > Thanks Dawid, having a look at CepOperator was useful. I implemented > something with

Re: Guaranteeing event order in a KeyedProcessFunction

2021-05-10 Thread Miguel Araújo
Thanks Dawid, having a look at CepOperator was useful. I implemented something with one difference I feel might be important: I noticed that in the CepOperator the timer is being registered for currentWatermark+1, instead of using the event's timestamp. Is there a reason for this? I think this

Re: Guaranteeing event order in a KeyedProcessFunction

2021-05-10 Thread Dawid Wysakowicz
Hey Miguel, I think you could take a look at the CepOperator which does pretty much what you are describing. As for more direct answers for your questions. If you use KeyedProcessFunction it is always scoped to a single Key. There is no way to process events from other keys. If you want to have

Re: Guaranteeing event order in a KeyedProcessFunction

2021-05-04 Thread Miguel Araújo
Hi Timo, Thanks for your answer. I think I wasn't clear enough in my initial message, so let me give more details. The stream is not keyed by timestamp, it's keyed by a custom field (e.g., user-id) and then fed into a KeyedProcessFunction. I want to process all events for a given user in order,

Re: Guaranteeing event order in a KeyedProcessFunction

2021-04-30 Thread Timo Walther
Hi Miguel, your initial idea sounds not too bad but why do you want to key by timestamp? Usually, you can simply key your stream by a custom key and store the events in a ListState until a watermark comes in. But if you really want to have some kind of global event-time order, you have two

Guaranteeing event order in a KeyedProcessFunction

2021-04-30 Thread Miguel Araújo
Hi everyone, I have a KeyedProcessFunction whose events I would like to process in event-time order. My initial idea was to use a Map keyed by timestamp and, when a new event arrives, iterate over the Map to process events older than the current watermark. The issue is that I obviously can't use