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

The abstraction to describe a watermark generator, providing virtual function of deciding watermark generation. More...

#include <WaterMarker/AbstractWaterMarker.h>

Inheritance diagram for OoOJoin::AbstractWaterMarker:
Collaboration diagram for OoOJoin::AbstractWaterMarker:

Public Member Functions

void setErrorBound (double err)
 Separately set the errorBound. More...
 
void syncTimeStruct (struct timeval tv)
 Synchronize the time structure with outside setting. More...
 
virtual bool setConfig (ConfigMapPtr cfg)
 Set the config map related to this operator. More...
 
virtual bool init (void)
 init the generator More...
 
virtual size_t creatWindow (tsType tBegin, tsType tEnd)
 creat a window More...
 
virtual bool deleteWindow (size_t wid)
 delete the window and recycle its id 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 Attributes

ConfigMapPtr config = nullptr
 

Protected Member Functions

virtual double estimateError (size_t wid=1)
 estimate the error of a window More...
 

Protected Attributes

double errorBound
 The assigned error bound, read from configuration.
 
struct timeval timeBaseStruct
 the base structure for time
 

Detailed Description

The abstraction to describe a watermark generator, providing virtual function of deciding watermark generation.

Todo:
multi window support is not done yet, left for future, but we do preserve the interfaces
Note
require configurations:
  • "errorBound" Double The assigned error bound

Member Function Documentation

◆ creatWindow()

size_t OoOJoin::AbstractWaterMarker::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 in OoOJoin::LatenessWM, and OoOJoin::ArrivalWM.

◆ deleteWindow()

bool OoOJoin::AbstractWaterMarker::deleteWindow ( size_t  wid)
virtual

delete the window and recycle its id

Returns
bool, whether the window is released

◆ estimateError()

double OoOJoin::AbstractWaterMarker::estimateError ( size_t  wid = 1)
protectedvirtual

estimate the error of a window

Parameters
widThe window id
Returns
The estimated error

◆ init()

bool OoOJoin::AbstractWaterMarker::init ( void  )
virtual

init the generator

Returns
bool whether the generator is successfully inited
Note
call before using

◆ reportTupleR()

bool OoOJoin::AbstractWaterMarker::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 in OoOJoin::LatenessWM, and OoOJoin::ArrivalWM.

◆ reportTupleS()

bool OoOJoin::AbstractWaterMarker::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 in OoOJoin::LatenessWM, and OoOJoin::ArrivalWM.

◆ setConfig()

bool OoOJoin::AbstractWaterMarker::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 in OoOJoin::LatenessWM, and OoOJoin::ArrivalWM.

◆ setErrorBound()

void OoOJoin::AbstractWaterMarker::setErrorBound ( double  err)
inline

Separately set the errorBound.

Parameters
errThe errorBound

◆ syncTimeStruct()

void OoOJoin::AbstractWaterMarker::syncTimeStruct ( struct timeval  tv)
inline

Synchronize the time structure with outside setting.

Parameters
tvThe outside time structure

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