Big Data Systems HPI

Quiz 4 - Stream Processing


Question

Consider a stream processing engine that performs a window join on the tuple key.

Assume a sliding window of length 10 seconds with a slide of 5 seconds. Time starts at 0, so the first window of length 10 ranges from 0 to 10, where 0 is included and 10 is not included [0, 10).

You have two streams R and S with events in the form of (timestamp, key, payload).

Stream R: { (1, a, 1), (3, a, 2), (7, b, 2), (8, c, 9), (9, a, 6), (12, b, 8), (13, c, 3), (16, b, 9) }

Stream S: { (2, b, A), (4, c, D), (5, c, C), (7, a, K), (8, a, Z), (11, c, L), (13, b, N), (19, c, M) }

You have received a watermark with the timestamp 22.

Please specify how many tuples are in the output stream after joining up to the watermark.


Answer

Split into 3 windows.

Multiply for each window the count of elements per Stream

--> 21




Comments