Thank you for your reply. I was wondering if there is some way that the process function can kiw which condition fired the trigger.
Eg: If I set trigger to fire when he object associated with key have value 2, 8, 10 (3 conditions for the trigger to fire), then if he process function, I want to operate differently on them.
On Mon, Feb 22, 2021, 11:23 AM yidan zhao <[hidden email]> wrote:
You can self-define it using keyedStream.window(GlobalWindows.create()).trigger(self-defined-trigger).
I think there is no way and I don't easily see how that could be added. You can however apply the same logic in the trigger also in your process function to detect which case caused the trigger.
If that is expensive to calculate, you might want to do it in a map before entering the window and have a trivial trigger.
input -> map(case detection) -> window (trigger = check if any case has been detected, process function = switch over case)
On Tue, Feb 23, 2021 at 4:05 AM Abhinav Sharma <[hidden email]> wrote:
Hi Yidan,
Thank you for your reply. I was wondering if there is some way that the process function can kiw which condition fired the trigger.
Eg: If I set trigger to fire when he object associated with key have value 2, 8, 10 (3 conditions for the trigger to fire), then if he process function, I want to operate differently on them.
On Mon, Feb 22, 2021, 11:23 AM yidan zhao <[hidden email]> wrote:
You can self-define it using keyedStream.window(GlobalWindows.create()).trigger(self-defined-trigger).