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

watermark generates at time t, and every thing arrives later then t will be discard, i.e., flush finial result at t More...

#include <WaterMarker/ArrivalWM.h>

Inheritance diagram for OoOJoin::ArrivalWM:
Collaboration diagram for OoOJoin::ArrivalWM:

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 watermarkTime = 0
 The period to generate watermark, internal, in us.
 
tsType nextWMDelta = 0
 The Delta value for next watermark.
 
tsType windowLen = 0
 
tsType nextWMPoint = 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

watermark generates at time t, and every thing arrives later then t will be discard, i.e., flush finial result at t

Todo:
multi window support is not done yet, left for future, but we do preserve the interfaces
Note
This one assert completeness by arrival time. Require configurations:
  • "errorBound" Double The assigned error bound
  • "timeStep" U64 The simulation time step in us
  • "watermarkTimeMs" U64 The time to generate a finial watermark in ms, indicating all data is ready

Member Function Documentation

◆ creatWindow()

size_t OoOJoin::ArrivalWM::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.

◆ reportTupleR()

bool OoOJoin::ArrivalWM::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::ArrivalWM::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::ArrivalWM::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

◆ windowLen

tsType OoOJoin::ArrivalWM::windowLen = 0
protected
Note
currently only support single window

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