OoOJoin  0.0.1
The next generation of out-of-order join operator
AbstractWaterMarker.h
Go to the documentation of this file.
1 
2 //
3 // Created by tony on 24/11/22.
4 //
5 
6 #ifndef _INCLUDE_WATERMARKER_ABSTRACTWATERMARKER_H_
7 #define _INCLUDE_WATERMARKER_ABSTRACTWATERMARKER_H_
8 #include <Common/Window.h>
9 #include <Common/Tuples.h>
10 #include <Common/Window.h>
11 #include <Common/Tuples.h>
13 #include <assert.h>
14 #include <Utils/ConfigMap.hpp>
15 
16 #include <Utils/IntelliLog.h>
17 #define WM_INFO INTELLI_INFO
18 #define WM_ERROR INTELLI_ERROR
19 #define WM_WARNNING INTELLI_WARNING
20 using namespace INTELLI;
21 namespace OoOJoin {
31  protected:
35  double errorBound;
36  //tsType timeStep;
40  struct timeval timeBaseStruct;
46  virtual double estimateError(size_t wid = 1);
47  public:
48  ConfigMapPtr config = nullptr;
51 
56  void setErrorBound(double err) {
57  errorBound = err;
58  }
63  void syncTimeStruct(struct timeval tv) {
64  timeBaseStruct = tv;
65  }
71  virtual bool setConfig(ConfigMapPtr cfg);
77  virtual bool init(void);
84  virtual size_t creatWindow(tsType tBegin, tsType tEnd);
89  virtual bool deleteWindow(size_t wid);
96  virtual bool reportTupleS(TrackTuplePtr ts, size_t wid = 1);
97 
104  virtual bool reportTupleR(TrackTuplePtr tr, size_t wid = 1);
105 
106 };
111 typedef std::shared_ptr<class AbstractWaterMarker> AbstractWaterMarkerPtr;
116 #define newAbstractWaterMarker std::make_shared<OoOJoin::AbstractWaterMarker>
117 }
118 #endif //INTELLISTREAM_INCLUDE_WATERMARKER_ABSTRACTWATERMARKER_H_
The abstraction to describe a watermark generator, providing virtual function of deciding watermark g...
Definition: AbstractWaterMarker.h:30
void setErrorBound(double err)
Separately set the errorBound.
Definition: AbstractWaterMarker.h:56
void syncTimeStruct(struct timeval tv)
Synchronize the time structure with outside setting.
Definition: AbstractWaterMarker.h:63
double errorBound
The assigned error bound, read from configuration.
Definition: AbstractWaterMarker.h:35
uint64_t tsType
Definition: Tuples.h:20
std::shared_ptr< class TrackTuple > TrackTuplePtr
The class to describe a shared pointer to TrackTuple.
Definition: Tuples.h:171
std::shared_ptr< ConfigMap > ConfigMapPtr
The class to describe a shared pointer to ConfigMap.
Definition: ConfigMap.hpp:356
Definition: OperatorTable.cpp:7
std::shared_ptr< class AbstractWaterMarker > AbstractWaterMarkerPtr
The class to describe a shared pointer to AbstractWaterMarker.
Definition: AbstractWaterMarker.h:111