This operator assures that there will be periodically a heartbeat to avoid blocking because of missing information about time progress. The operator guarantees, that no element (heartbeat or streamobject) is send, that is older than the last send heartbeat (i.e. the generated heartbeats are in order and indicate time progress). Heartbeats can be send periodically (sendAlwaysHeartbeats = true) or only if no other stream elements indicate time progress (e.g. in out of order scenarios) independent if a new element has been received or not.

Parameter

  • RealTimeDelay: How long should the operator wait in transaction time (real time) before it should send a punctuation
  • ApplicationTimeDelay: How long is the realTimeDelay in terms of application time (typically this should be the same, but for simulations this could be adapted)
  • TimeUnit: What is the time unit (see Java TimeUnit). Minimum Time unit is milliseconds!
  • SendAlwaysHeartbeat: If true, a heartbeat is send periodically for every realTimeDelay. This is useful for out of order processing
  • AllowOutOfOrder: If set to true, the operator allows heartbeats to be send, that lie before the last send element. In other cases this is not allowed.
  • StartAtCurrentTime: Normally, heartbeats start at 0, however, if this parameter is set to "true", heartbeats begin at current system time in millis. This might be e.g. useful, if there is no tuple at the beginning of the process. 
  • StartTimerAfterFirstElement: Normally, heartbeats start when the query starts, However, if this parameter is set to true, the generation starts with the first element.
  • RestartTimerForEveryInput: If this parameter is set to true, the timer that triggers the heartbeat generation is restarted for every received element.
  • SendOnlyOneHeartbeat: Stops the generator after sending a heartbeat. The generator will be started again if a new element is received by this operator.

Example


AssureHeartbeat Operator
output = HEARTBEAT({realTimeDelay=5000, applicationTimeDelay=5000, sendAlwaysHeartbeat='false', allowOutOfOrder='false'}, input)

output = HEARTBEAT({realTimeDelay=5000, applicationTimeDelay=5000, sendAlwaysHeartbeat='false', allowOutOfOrder='false', startAtCurrentTime='true'}, input)

Remark: Renamed from AssureHeartbeat

  • No labels