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

The intra window join (MeanAQPIAWJ) operator under the simplest AQP strategy, only considers a single window and uses exponential weighted moving average for prediction. More...

#include <Operator/MeanAQPIAWJOperator.h>

Inheritance diagram for OoOJoin::MeanAQPIAWJOperator:
Collaboration diagram for OoOJoin::MeanAQPIAWJOperator:

Classes

class  MeanStateOfKey
 

Public Member Functions

virtual bool setConfig (ConfigMapPtr cfg)
 Set the config map related to this operator. More...
 
virtual bool feedTupleS (TrackTuplePtr ts)
 feed a tuple s into the Operator More...
 
virtual bool feedTupleR (TrackTuplePtr tr)
 feed a tuple R into the Operator More...
 
virtual bool start ()
 start this operator More...
 
virtual bool stop ()
 stop this operator More...
 
virtual size_t getResult ()
 get the joined sum result More...
 
virtual size_t getAQPResult ()
 get the joined sum result under AQP More...
 
virtual ConfigMapPtr getTimeBreakDown ()
 get the break down information of processing time More...
 
- Public Member Functions inherited from OoOJoin::AbstractOperator
void setWindow (size_t _wl, size_t _sli)
 Set the window parameters of the whole operator. More...
 
void setBufferLen (size_t _sLen, size_t _rLen)
 Set buffer length of S and R buffer. More...
 
void syncTimeStruct (struct timeval tv)
 Synchronize the time structure with outside setting. More...
 

Protected Types

typedef std::shared_ptr< MeanStateOfKeyMeanStateOfKeyPtr
 

Protected Member Functions

void conductComputation ()
 
void updateStateOfKey (MeanStateOfKeyPtr sk, TrackTuplePtr tp)
 
void lazyComputeOfAQP ()
 
double predictUnarrivedTuples (MeanStateOfKeyPtr px)
 
- Protected Member Functions inherited from OoOJoin::AbstractOperator
void setFinalProcessedTime ()
 set the final processed time for all tuples
 

Protected Attributes

Window myWindow
 
size_t intermediateResult = 0
 
size_t confirmedResult = 0
 
uint64_t windowBound = 0
 
double alphaArrivalSkew = 0.125
 
double betaArrivalSkew = 0.25
 
double aqpScale = 0.1
 
atomic_bool lockedByWaterMark = false
 
AbstractWaterMarkerPtr wmGen = nullptr
 
StateOfKeyHashTablePtr stateOfKeyTableR
 
StateOfKeyHashTablePtr stateOfKeyTableS
 
tsType lastTimeOfR = 0
 
tsType timeBreakDown_index
 for time breakdown of searching index
 
tsType timeBreakDown_prediction
 for time breakdown of prediction
 
tsType timeBreakDown_join
 for time breakdown of join
 
- Protected Attributes inherited from OoOJoin::AbstractOperator
struct timeval timeBaseStruct
 
size_t windowLen = 0
 
size_t slideLen = 0
 
size_t sLen = 0
 
size_t rLen = 0
 
int threads = 0
 
tsType timeStep = 0
 
tsType timeBreakDown_all = 0
 

Additional Inherited Members

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

Detailed Description

The intra window join (MeanAQPIAWJ) operator under the simplest AQP strategy, only considers a single window and uses exponential weighted moving average for prediction.

Note
require configurations:
  • "windowLen" U64: The length of window
  • "slideLen" U64: The length of slide
  • "sLen" U64: The length of S buffer
  • "rLen" U64: The length of R buffer
  • "wmTag" String: The tag of watermarker, default is arrival for ArrivalWM
Warning
This implementation is putting rotten, just to explore a basic idea of AQP by using historical mean to predict future
The predictor and watermarker are currently NOT seperated in this operator, split them in the future!
Note
In current version, the computation will block feeding
follows the assumption of linear independent arrival and skewness
operator tag = "MeanAQP"

Member Function Documentation

◆ feedTupleR()

bool OoOJoin::MeanAQPIAWJOperator::feedTupleR ( OoOJoin::TrackTuplePtr  tr)
virtual

feed a tuple R into the Operator

Parameters
trThe tuple
Warning
The current version is simplified and assuming only used in SINGLE THREAD!
Returns
bool, whether tuple is fed.

Reimplemented from OoOJoin::AbstractOperator.

Reimplemented in OoOJoin::IMAIAWJOperator.

◆ feedTupleS()

bool OoOJoin::MeanAQPIAWJOperator::feedTupleS ( OoOJoin::TrackTuplePtr  ts)
virtual

feed a tuple s into the Operator

Parameters
tsThe tuple
Warning
The current version is simplified and assuming only used in SINGLE THREAD!
Returns
bool, whether tuple is fed.

Reimplemented from OoOJoin::AbstractOperator.

Reimplemented in OoOJoin::IMAIAWJOperator.

◆ getAQPResult()

size_t OoOJoin::MeanAQPIAWJOperator::getAQPResult ( )
virtual

get the joined sum result under AQP

Returns
The result

Reimplemented from OoOJoin::AbstractOperator.

Reimplemented in OoOJoin::IMAIAWJOperator.

◆ getResult()

size_t OoOJoin::MeanAQPIAWJOperator::getResult ( )
virtual

get the joined sum result

Returns
The result

Reimplemented from OoOJoin::AbstractOperator.

Reimplemented in OoOJoin::IMAIAWJOperator.

◆ getTimeBreakDown()

ConfigMapPtr OoOJoin::MeanAQPIAWJOperator::getTimeBreakDown ( )
virtual

get the break down information of processing time

Warning
should check the nullptr of output
Returns
The ConfigMapPtr which contains breakdown information, null if no breakdown supported
Note
provided breakdown:
  • "index" U64, processing time on prediction for indexing the tuple state in hhash table
  • "prediction" U64, processing time on prediction
  • "join" U64, processing time on prediction The total processing time=index+prediction+join

Reimplemented from OoOJoin::AbstractOperator.

◆ setConfig()

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

Set the config map related to this operator.

Todo:
Where this operator is conducting join is still putting rotten, try to place it at feedTupleS/R
Parameters
cfgThe config map
Returns
bool whether the config is successfully set

Reimplemented from OoOJoin::AbstractOperator.

Reimplemented in OoOJoin::IMAIAWJOperator.

◆ start()

bool OoOJoin::MeanAQPIAWJOperator::start ( )
virtual

start this operator

Returns
bool, whether start successfully

set watermark generator

Note
:

set window

Reimplemented from OoOJoin::AbstractOperator.

Reimplemented in OoOJoin::IMAIAWJOperator.

◆ stop()

bool OoOJoin::MeanAQPIAWJOperator::stop ( )
virtual

stop this operator

Returns
bool, whether start successfully

Reimplemented from OoOJoin::AbstractOperator.

Reimplemented in OoOJoin::IMAIAWJOperator.


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