Hi, I just want to ask for a general implementation idea if anyone has run into this. I have a finite dataset of user_id, then i have a streaming of data stream of (user_id, event). what my use case is that if one particular user_id has no event coming in for x minutes, the system will alert. This x minutes also includes if there is no data comes in since the system is up. So for example, user 1 has no events comes in for 3 minutes since last event, it will alert, or user 1 has no events at all for 3 minutes since the system is up, it will alert.
What i can’t figure out is this: apparently i need to use user_id to keyBy the data stream, and if I boardcast the dataset as boardcast state, then all the parallelisms has the full dataset, then how can i know which user_id showed up in which parallelism so that it doesn’t need to be triggered.
In my mind, It feels to me the way to resolve this is to partition dataset to flink operator, so that user_id in the dataset goes to the same stream operator who handles the same user_id of keyBy. But the question is how I know flink operator is in charge of what range of user_id if I use keyBy. Is there a way to match operator to certain kafka partitions if i assume the data is partitioned by user_key in the kafka as input.
I hope what I said make sense to you. And I am looking forward to someone giving me some ideas