OoOJoin  0.0.1
The next generation of out-of-order join operator
IMAIAWJOperator.h
Go to the documentation of this file.
1 
3 //
4 // Created by tony on 03/12/22.
5 //
6 
7 #ifndef INTELLISTREAM_INCLUDE_OPERATOR_MEANAQPIMAIAWJOperator_H_
8 #define INTELLISTREAM_INCLUDE_OPERATOR_MEANAQPIMAIAWJOperator_H_
10 #include <Common/Window.h>
11 #include <atomic>
12 #include <WaterMarker/LatenessWM.h>
13 #include <Common/StateOfKey.h>
14 namespace OoOJoin {
15 
35  protected:
36  //Window myWindow;
37  //size_t intermediateResult = 0;
38  //size_t confirmedResult = 0;
39  //uint64_t windowBound = 0;
40  // double alphaArrivalRate=0.125;
41  // double alphaArrivalSkew = 0.125;
42  // double betaArrivalSkew = 0.25;
43  //tsType lastTimeS = 0, lastTimeR = 0;
44  // double aqpScale = 0.1;
45  void conductComputation();
46  // atomic_bool lockedByWaterMark = false;
47  //AbstractWaterMarkerPtr wmGen = nullptr;
48  //StateOfKeyHashTablePtr stateOfKeyTableR, stateOfKeyTableS;
49  class IMAStateOfKey : public MeanStateOfKey {
50  public:
51  // size_t arrivedTupleCnt = 0;
52  // double arrivalSkew = 0, sigmaArrivalSkew = 0;
53  // TrackTuplePtr lastEventTuple = nullptr, lastArrivalTuple = nullptr;
54  // tsType lastSeenTime=0;
55  //size_t lastEstimateAllTuples=0;
56  double lastUnarrivedTuples = 0;
57  // size_t lastAdded=0;
58  IMAStateOfKey() {}
59  ~IMAStateOfKey() {}
60  };
61  typedef std::shared_ptr<IMAStateOfKey> IMAStateOfKeyPtr;
62 #define newIMAStateOfKey std::make_shared<IMAStateOfKey>
63  // void updateStateOfKey(IMAStateOfKeyPtr sk, TrackTuplePtr tp);
64  // void updateStateOfKeyR(MeanStateOfKeyPtr sk,TrackTuplePtr tp);
65  // void lazyComputeOfAQP();
66  // double predictUnarrivedTuples(IMAStateOfKeyPtr px,TrackTuplePtr tp);
67  public:
68  IMAIAWJOperator() {}
69  ~IMAIAWJOperator() {}
76  virtual bool setConfig(ConfigMapPtr cfg);
83  virtual bool feedTupleS(TrackTuplePtr ts);
84 
91  virtual bool feedTupleR(TrackTuplePtr tr);
92 
97  virtual bool start();
98 
103  virtual bool stop();
104 
109  virtual size_t getResult();
110 
115  virtual size_t getAQPResult();
116 
117 };
124 typedef std::shared_ptr<class IMAIAWJOperator> IMAIAWJOperatorPtr;
132 #define newIMAIAWJOperator std::make_shared<OoOJoin::IMAIAWJOperator>
133 }
134 #endif //INTELLISTREAM_INCLUDE_OPERATOR_MEANAQPIMAIAWJOperator_H_
Definition: IMAIAWJOperator.h:49
The IAWJ operator under the simplest AQP strategy, and updates incrementally (IMA),...
Definition: IMAIAWJOperator.h:34
virtual bool feedTupleR(TrackTuplePtr tr)
feed a tuple R into the Operator
Definition: IMAIAWJOperator.cpp:125
virtual size_t getAQPResult()
get the joined sum result under AQP
Definition: IMAIAWJOperator.cpp:177
virtual bool setConfig(ConfigMapPtr cfg)
Set the config map related to this operator.
Definition: IMAIAWJOperator.cpp:4
virtual bool feedTupleS(TrackTuplePtr ts)
feed a tuple s into the Operator
Definition: IMAIAWJOperator.cpp:70
virtual bool start()
start this operator
Definition: IMAIAWJOperator.cpp:18
virtual bool stop()
stop this operator
Definition: IMAIAWJOperator.cpp:51
virtual size_t getResult()
get the joined sum result
Definition: IMAIAWJOperator.cpp:172
Definition: MeanAQPIAWJOperator.h:61
The intra window join (MeanAQPIAWJ) operator under the simplest AQP strategy, only considers a single...
Definition: MeanAQPIAWJOperator.h:33
std::shared_ptr< class IMAIAWJOperator > IMAIAWJOperatorPtr
The class to describe a shared pointer to IMAIAWJOperator.
Definition: IMAIAWJOperator.h:124
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