Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
0.10.1
-
None
-
Patch
Description
Current Flink streaming only supports join two streams on the same window. How to solve this problem?
For example, there are two streams. One is advertisements showed to users. The tuple in which could be described as (id, showed timestamp). The other one is click stream – (id, clicked timestamp). We want get a joined stream, which includes all the advertisement that is clicked by user in 20 minutes after showed.
It is possible that after an advertisement is shown, some user click it immediately. It is possible that "click" message arrives server earlier than "show" message because of Internet delay. We assume that the maximum delay is one minute.
Then the need is that we should alway keep a buffer(20 mins) of "show" stream and another buffer(1 min) of "click" stream.
It would be grate that there is such an API like.
showStream.join(clickStream)
.where(keySelector)
.buffer(Time.of(20, TimeUnit.MINUTES))
.equalTo(keySelector)
.buffer(Time.of(1, TimeUnit.MINUTES))
.apply(JoinFunction)
Attachments
Issue Links
- links to