The processWatermark(..) function is called inside the process(..) function
and use the key of the process function to write back to Kafka.
However, windows with different keys can be processed inside the function and produce a result.
This may result in the same key being used for different window results.
Using the key that belongs to the SlicingWindowOperator leads to the desired result.
Wrong behavior:
The Key s_9 is used in both windows, that have the same window time.
However, actually their keys should be different.
The
processWatermark(..)
function is called inside theprocess(..)
function and use the key of the process function to write back to Kafka. However, windows with different keys can be processed inside the function and produce a result. This may result in the same key being used for different window results. Using the key that belongs to the SlicingWindowOperator leads to the desired result.Wrong behavior: The Key
s_9
is used in both windows, that have the same window time. However, actually their keys should be different.Desired behavior: Now
s_5
ands_9
are used as the keys for the different windows.