0
votes

I am new to Flink, need help with the approach. I have events stream with time granularity of 5 minutes. I want to get meta data of event by calling rest API with historic events of last 1 hour data points i.e last 12 points ( 5 minutes time granularity).

e.g events are timestamped with 10:00, 10:05, 10:10, 10:15 etc so if I want to get the meta data of event timestamped 11:00, I will call send all the events with timestamps 10:00, 10:05, 10:10, 10:15 .. 10:55

I implemented the approach using TimeCharacteristic.EventTime execution environment, and used AssignerWithPeriodicWatermarks to extract timestamp of event and watermark with 1 hour lag.

To get the previous points I created a sliding window of 1 hour and slide of 5 minutes ( assuming 1 event will slide with window). I created ProcessAllWindowFunction, collected all the window elements and call the rest api. However, when I print the window elements I get around 400 event time stamps.

Looks like windows are not getting created properly. Not sure if the issue is in the code or my approach

1
can you post the code?Felipe

1 Answers