OoOJoin  0.0.1
The next generation of out-of-order join operator
OoOJoin::LatenessWM Class Reference

The class which generates watermark according to lateness of event time. A tuple with event time earlier than max (event time we have seen) - lateness will be discard and trigger a compute. More...

#include <WaterMarker/LatenessWM.h>

Inheritance diagram for OoOJoin::LatenessWM:
Collaboration diagram for OoOJoin::LatenessWM:

Public Member Functions

virtual bool setConfig (ConfigMapPtr cfg)
 Set the config map related to this operator. More...
 
virtual size_t creatWindow (tsType tBegin, tsType tEnd)
 creat a window More...
 
virtual bool reportTupleS (TrackTuplePtr ts, size_t wid=1)
 report a tuple s into the watermark generator More...
 
virtual bool reportTupleR (TrackTuplePtr tr, size_t wid=1)
 Report a tuple R into the watermark generator. More...
 
- Public Member Functions inherited from OoOJoin::AbstractWaterMarker
void setErrorBound (double err)
 Separately set the errorBound. More...
 
void syncTimeStruct (struct timeval tv)
 Synchronize the time structure with outside setting. More...
 
virtual bool init (void)
 init the generator More...
 
virtual bool deleteWindow (size_t wid)
 delete the window and recycle its id More...
 

Protected Member Functions

bool isReachWMPoint (TrackTuplePtr tp)
 
- Protected Member Functions inherited from OoOJoin::AbstractWaterMarker
virtual double estimateError (size_t wid=1)
 estimate the error of a window More...
 

Protected Attributes

tsType lateness = 0
 The max allowed lateness, internal, in us.
 
tsType earlierEmit = 0
 The time of earlier emit before reaching window bound, internal, in us.
 
tsType windowUpperBound = 0
 
tsType maxEventTime = 0
 
- Protected Attributes inherited from OoOJoin::AbstractWaterMarker
double errorBound
 The assigned error bound, read from configuration.
 
struct timeval timeBaseStruct
 the base structure for time
 

Additional Inherited Members

- Public Attributes inherited from OoOJoin::AbstractWaterMarker
ConfigMapPtr config = nullptr
 

Detailed Description

The class which generates watermark according to lateness of event time. A tuple with event time earlier than max (event time we have seen) - lateness will be discard and trigger a compute.

Note
This one assert completeness by arrival time. Require configurations:
  • "latenessMs" U64 Here used to control the lateness, in ms
  • "earlierEmitMs" U64 Here used to allow earlier emit, in ms

When assign this final water mark, it "convince' the system that everything whose event time is earlier than window bound, is arrived, so we can provide the final result. The condition is

  • windowUpperBound-earlierEmit+lateness<maxEventTime

Member Function Documentation

◆ creatWindow()

size_t OoOJoin::LatenessWM::creatWindow ( OoOJoin::tsType  tBegin,
OoOJoin::tsType  tEnd 
)
virtual

creat a window

Parameters
tBeginThe begin event time of the window
tEndThe end event time of the window
Returns
the id of created window

Reimplemented from OoOJoin::AbstractWaterMarker.

◆ isReachWMPoint()

bool OoOJoin::LatenessWM::isReachWMPoint ( OoOJoin::TrackTuplePtr  tp)
protected

When assign this final water mark, it asserts that everything earlier than window bound is arrived, so we can provide the final result

◆ reportTupleR()

bool OoOJoin::LatenessWM::reportTupleR ( OoOJoin::TrackTuplePtr  tr,
size_t  wid = 1 
)
virtual

Report a tuple R into the watermark generator.

Parameters
trThe tuple
widThe id of window
Returns
bool, bool, whether generate watermark after receiving this Tuple

Reimplemented from OoOJoin::AbstractWaterMarker.

◆ reportTupleS()

bool OoOJoin::LatenessWM::reportTupleS ( OoOJoin::TrackTuplePtr  ts,
size_t  wid = 1 
)
virtual

report a tuple s into the watermark generator

Parameters
tsThe tuple
widThe id of window
Returns
bool, whether generate watermark after receiving this Tuple

Reimplemented from OoOJoin::AbstractWaterMarker.

◆ setConfig()

bool OoOJoin::LatenessWM::setConfig ( INTELLI::ConfigMapPtr  cfg)
virtual

Set the config map related to this operator.

Parameters
cfgThe config map
Returns
bool whether the config is successfully set

Reimplemented from OoOJoin::AbstractWaterMarker.

Member Data Documentation

◆ windowUpperBound

tsType OoOJoin::LatenessWM::windowUpperBound = 0
protected
Note
currently only support single window

The documentation for this class was generated from the following files: