A session window is a combination of heartbeat and predicate window with a specific configuration. A session ends when a heartbeat is received. Than, all stored elements will be transferred.
Parameter
threshold:The time to wait for a new element before closing the window [ms].startAtCurrentTime:Configuration of heartbeats. True = system time is used; False: time starts at 0.
Remark: This is a blocking operator. The operator does not write elements before it receives a heartbeat.
Transformation
In the following the transformation of a session window to a heartbeat and predicate window is shown.
output = SESSIONWINDOW({
threshold = 1000,
startatcurrenttime = true
},
input
)
It will be tranformed to
heartbeats = HEARTBEAT({
applicationtimedelay = 1000,
realtimedelay = 1000,
sendalwaysheartbeat = 'false',
allowoutofordercreation = 'false',
startatcurrenttime = 'true',
sendOnlyOneHeartbeat = 'true'
},
input
)
output= PREDICATEWINDOW({
start = 'true',
end = 'false',
closewindowwithheartbeat = 'true'
},
graph_data_with_heartbeat
)