Classes for implementing event-time processing functionality. More...
![]() |
Classes |
|
class | SPL::EventTimeContext |
Event-time optional context interface for an SPL Operator. More... |
|
class | SPL::TimeIntervalWindow< T, G, D, S > |
Window which collects tuples into window time intervals defined over specific event-time intervals. More... |
|
class | SPL::TimeIntervalWindowOptions |
Provides configuration options for an event-time window with fixed duration window time intervals. More... |
|
class | SPL::TimeIntervalWindowPane< T, G, D, S > |
Window which stores tuples with an event time which falls within a specified interval. More... |
|
class | SPL::TriggerInfoProvider |
Interface which provides information about an event-time window, observable within the WindowEvent handler code. More... |
|
Functions |
|
std::ostream & | SPL::operator<< (std::ostream &out, const EventTimeContext::WatermarkMode value) |
Serialize the specified value. More... |
|
Classes for implementing event-time processing functionality.
Event-time is a simple model which supports streams processing where time is not derived from the system time of the machine Streams is running on, but from a time value associated with each tuple. In a graph enabled for event-time, tuples have an attribute which holds their time value. Having a time value for each tuple enables operations such as grouping tuples with a time value falling within specified time intervals, and running aggregate calculations on the group.
Watermarks keep track of event-time progress in a data stream. A watermark provides a metric of event time progress in a data stream. Ideally:
Note that a watermark is only an estimate of completeness. If the event time value is set before ingestion, the system cannot guarantee that late tuples are not observed.
Late tuples - in real life scenarios, tuples with event times earlier than X may be observed after a watermark with time X. These tuples are late with respect to the watermark.
Event-time windows collect tuples along event-time boundaries into window time intervals. A window time interval is specified by its low (t0) and high (t0+T) boundaries and contains all tuples with event-time values within the interval [t0, t0+T)
. A new SPL window clause is provided to specify event time windows. An event-time window partitions the time domain into equally sized intervals of the form: [N * creationPeriod + intervalOffset, (N + 1) * creationPeriod + intervalOffset + intervalDuration)
where intervalDuration, creationPeriod, and intervalOffset are parameters defined by the SPL window clause. An event-time window operates by assigning tuples to the window pane instances corresponding to the time intervals the tuple's event time belongs to.
Default trigger policy - when the input event-time (as specified by the latest watermark) becomes later than the window time interval's high boundary, the time interval is complete and triggers. If tuples with event times within the time interval's interval arrive after the time interval has triggered (late tuples) the time interval triggers again and the operator which handles the trigger event re-calculates output taking into account the late data.
An event time window has a maximum lateness horizon characterized by the discardAge SPL window clause option. Tuples which arrive later than the maximum lateness value are ignored by the window. The window content is deleted after the window is closed.
std::ostream& SPL::operator<< | ( | std::ostream & | out, |
const EventTimeContext::WatermarkMode | value | ||
) |
Serialize the specified value.