A platform for high-performance distributed tool and library development written in C++. It can be deployed in two different cluster modes: standalone or distributed. API for v0.5.0, released on June 13, 2018.
|
#include <Computation.h>
Public Member Functions | |
virtual void | extractLambdas (std::map< std::string, GenericLambdaObjectPtr > &returnVal) |
virtual ComputeSourcePtr | getComputeSource (TupleSpec &produceMe, ComputePlan &plan) |
virtual ComputeSinkPtr | getComputeSink (TupleSpec &consumeMe, TupleSpec &projection, ComputePlan &plan) |
virtual ComputeSinkPtr | getComputeSink (TupleSpec &consumeMe, TupleSpec &whichAttsToOpOn, TupleSpec &projection, ComputePlan &plan) |
virtual SinkMergerPtr | getSinkMerger (TupleSpec &consumeMe, TupleSpec &projection, ComputePlan &plan) |
virtual SinkMergerPtr | getSinkMerger (TupleSpec &consumeMe, TupleSpec &whichAttsToOpOn, TupleSpec &projection, ComputePlan &plan) |
virtual SinkShufflerPtr | getSinkShuffler (TupleSpec &consumeMe, TupleSpec &projection, ComputePlan &plan) |
JiaNote: add below interface for shuffling multiple join map sinks for hash partitioned join. More... | |
virtual SinkShufflerPtr | getSinkShuffler (TupleSpec &consumeMe, TupleSpec &whichAttsToOpOn, TupleSpec &projection, ComputePlan &plan) |
virtual std::string | getComputationType ()=0 |
virtual std::string | toTCAPString (std::vector< InputTupleSetSpecifier > &inputTupleSets, int computationLabel, std::string &outputTupleSetName, std::vector< std::string > &outputColumnNames, std::string &addedOutputColumnName)=0 |
virtual std::string | getIthInputType (int i)=0 |
bool | hasInput () |
Handle< Computation > & | getIthInput (int i) const |
virtual int | getNumInputs ()=0 |
virtual std::string | getOutputType ()=0 |
virtual ComputationTypeID | getComputationTypeID ()=0 |
int | getNumConsumers () |
void | setNumConsumers (int numConsumers) |
bool | setInput (Handle< Computation > toMe) |
bool | setInput (int whichSlot, Handle< Computation > toMe) |
bool | isTraversed () |
void | setTraversed (bool traversed) |
std::string | getOutputTupleSetName () |
void | setOutputTupleSetName (std::string outputTupleSetName) |
std::string | getOutputColumnToApply () |
void | setOutputColumnToApply (std::string outputColumnToApply) |
virtual void | setOutput (std::string dbName, std::string setName) |
virtual std::string | getDatabaseName () |
virtual std::string | getSetName () |
virtual bool | needsMaterializeOutput () |
virtual void | setBatchSize (int batchSize) |
virtual bool | isUsingCombiner () |
virtual void | setUsingCombiner (bool useCombinerOrNot) |
void | setAllocatorPolicy (AllocatorPolicy myPolicy) |
void | setObjectPolicy (ObjectPolicy myPolicy) |
AllocatorPolicy | getAllocatorPolicy () |
ObjectPolicy | getObjectPolicy () |
virtual void | setCollectAsMap (bool collectAsMapOrNot) |
virtual bool | isCollectAsMap () |
virtual int | getNumNodesToCollect () |
virtual void | setNumNodesToCollect (int numNodesToCollect) |
Public Member Functions inherited from pdb::Object | |
void | setVTablePtr (void *setToMe) |
void * | getVTablePtr () |
virtual void | setUpAndCopyFrom (void *target, void *source) const |
virtual void | deleteObject (void *deleteMe) |
virtual size_t | getSize (void *ofMe) |
Private Attributes | |
Handle< Vector< Handle < Computation > > > | inputs = nullptr |
bool | traversed = false |
String | outputTupleSetName = "" |
String | outputColumnToApply = "" |
int | numConsumers = 0 |
AllocatorPolicy | myAllocatorPolicy = AllocatorPolicy::defaultAllocator |
ObjectPolicy | myObjectPolicy = ObjectPolicy::defaultObject |
Additional Inherited Members | |
Static Public Member Functions inherited from pdb::Object | |
static void * | operator new (size_t sz, const std::nothrow_t &tag) |
static void * | operator new (size_t sz) |
static void | operator delete (void *me) |
static void * | operator new (std::size_t count, void *ptr) |
All nodes in a user-supplied computation are descended from this
Definition at line 59 of file Computation.h.
|
inlinevirtual |
This is implemented by the actual computation object... as the name implies, it is used to extract the lambdas from the computation
Reimplemented in pdb::JoinCompBase< Out, In1, In2, Rest >, pdb::JoinCompBase< Out, In1, In2, Args... >, pdb::AggregateCompBase< OutputClass, InputClass, KeyClass, ValueClass >, pdb::AggregateCompBase< TopKQueue< Score, ValueType >, InputClass, int, TopKQueue< Score, ValueType > >, pdb::MultiSelectionCompBase< OutputClass, InputClass >, pdb::SelectionCompBase< OutputClass, InputClass >, pdb::PartitionCompBase< KeyClass, ValueClass >, and pdb::PartitionTransformationCompBase< KeyClass, ValueClass >.
Definition at line 67 of file Computation.h.
|
inline |
Definition at line 337 of file Computation.h.
|
pure virtual |
Implemented in pdb::JoinCompBase< Out, In1, In2, Rest >, pdb::JoinCompBase< Out, In1, In2, Args... >, pdb::AggregateCompBase< OutputClass, InputClass, KeyClass, ValueClass >, pdb::AggregateCompBase< TopKQueue< Score, ValueType >, InputClass, int, TopKQueue< Score, ValueType > >, pdb::ScanUserSetBase< OutputClass >, pdb::ScanUserSetBase< DoubleVector >, pdb::WriteUserSetBase< OutputClass >, pdb::MultiSelectionCompBase< OutputClass, InputClass >, pdb::SelectionCompBase< OutputClass, InputClass >, pdb::PartitionCompBase< KeyClass, ValueClass >, pdb::PartitionTransformationCompBase< KeyClass, ValueClass >, and pdb::AbstractPartitionComp< KeyClass, ValueClass >.
|
pure virtual |
gets the output type if of this query
Implemented in pdb::JoinCompBase< Out, In1, In2, Rest >, pdb::JoinCompBase< Out, In1, In2, Args... >, pdb::AggregateCompBase< OutputClass, InputClass, KeyClass, ValueClass >, pdb::AggregateCompBase< TopKQueue< Score, ValueType >, InputClass, int, TopKQueue< Score, ValueType > >, pdb::ScanUserSetBase< OutputClass >, pdb::ScanUserSetBase< DoubleVector >, pdb::AbstractAggregateComp, pdb::WriteUserSetBase< OutputClass >, pdb::MultiSelectionCompBase< OutputClass, InputClass >, pdb::AbstractJoinComp, pdb::SelectionCompBase< OutputClass, InputClass >, pdb::PartitionCompBase< KeyClass, ValueClass >, pdb::PartitionTransformationCompBase< KeyClass, ValueClass >, and pdb::AbstractPartitionComp< KeyClass, ValueClass >.
|
inlinevirtual |
likewise, if this particular computation can be used as a compute sink in a pipeline, this method will return the compute sink object associated with the computation. It requires the TupleSpec that should be processed, as well as the projection of that TupleSpec that will be put into the sink
Reimplemented in pdb::SelectionCompBase< OutputClass, InputClass >, pdb::MultiSelectionCompBase< OutputClass, InputClass >, pdb::PartitionCompBase< KeyClass, ValueClass >, pdb::PartitionTransformationCompBase< KeyClass, ValueClass >, pdb::AbstractPartitionComp< KeyClass, ValueClass >, pdb::WriteUserSetBase< OutputClass >, pdb::AggregateCompBase< OutputClass, InputClass, KeyClass, ValueClass >, and pdb::AggregateCompBase< TopKQueue< Score, ValueType >, InputClass, int, TopKQueue< Score, ValueType > >.
Definition at line 88 of file Computation.h.
|
inlinevirtual |
Reimplemented in pdb::JoinCompBase< Out, In1, In2, Rest >, and pdb::JoinCompBase< Out, In1, In2, Args... >.
Definition at line 94 of file Computation.h.
|
inlinevirtual |
If this particular computation can be used as a compute source in a pipeline, this method will return the compute source object associated with the computation...
In the general case, this method accepts the logical plan that this guy is a part of, as well as the actual TupleSpec that this guy is supposed to produce, and then returns a pointer to a ComputeSource object that can actually produce TupleSet objects corresponding to that particular TupleSpec
Reimplemented in pdb::JoinCompBase< Out, In1, In2, Rest >, pdb::JoinCompBase< Out, In1, In2, Args... >, pdb::MultiSelectionCompBase< OutputClass, InputClass >, pdb::SelectionCompBase< OutputClass, InputClass >, pdb::PartitionCompBase< KeyClass, ValueClass >, pdb::PartitionTransformationCompBase< KeyClass, ValueClass >, pdb::AbstractPartitionComp< KeyClass, ValueClass >, pdb::AggregateCompBase< OutputClass, InputClass, KeyClass, ValueClass >, pdb::AggregateCompBase< TopKQueue< Score, ValueType >, InputClass, int, TopKQueue< Score, ValueType > >, pdb::ScanUserSetBase< OutputClass >, and pdb::ScanUserSetBase< DoubleVector >.
Definition at line 78 of file Computation.h.
|
inlinevirtual |
Reimplemented in pdb::MultiSelectionCompBase< OutputClass, InputClass >, pdb::SelectionCompBase< OutputClass, InputClass >, pdb::PartitionCompBase< KeyClass, ValueClass >, pdb::AggregateCompBase< OutputClass, InputClass, KeyClass, ValueClass >, pdb::AggregateCompBase< TopKQueue< Score, ValueType >, InputClass, int, TopKQueue< Score, ValueType > >, pdb::PartitionTransformationCompBase< KeyClass, ValueClass >, pdb::ScanUserSetBase< OutputClass >, pdb::ScanUserSetBase< DoubleVector >, pdb::AbstractPartitionComp< KeyClass, ValueClass >, and pdb::WriteUserSetBase< OutputClass >.
Definition at line 305 of file Computation.h.
|
inline |
get a handle to the i^th input to this query, which is also a query
i |
Definition at line 160 of file Computation.h.
|
pure virtual |
gets the name of the i^th input type...
i |
Implemented in pdb::ScanUserSetBase< OutputClass >, pdb::ScanUserSetBase< DoubleVector >, pdb::JoinCompBase< Out, In1, In2, Rest >, pdb::JoinCompBase< Out, In1, In2, Args... >, pdb::AggregateCompBase< OutputClass, InputClass, KeyClass, ValueClass >, pdb::AggregateCompBase< TopKQueue< Score, ValueType >, InputClass, int, TopKQueue< Score, ValueType > >, pdb::JoinCompBase< Out, In1, In2, Rest >, pdb::JoinCompBase< Out, In1, In2, Args... >, pdb::JoinCompBase< Out, In1, In2, Rest >, pdb::JoinCompBase< Out, In1, In2, Args... >, pdb::WriteUserSetBase< OutputClass >, pdb::MultiSelectionCompBase< OutputClass, InputClass >, pdb::SelectionCompBase< OutputClass, InputClass >, and pdb::AbstractPartitionComp< KeyClass, ValueClass >.
|
inline |
|
pure virtual |
get the number of inputs to this query type
Implemented in pdb::ScanUserSetBase< OutputClass >, pdb::ScanUserSetBase< DoubleVector >, pdb::AggregateCompBase< OutputClass, InputClass, KeyClass, ValueClass >, pdb::AggregateCompBase< TopKQueue< Score, ValueType >, InputClass, int, TopKQueue< Score, ValueType > >, pdb::JoinCompBase< Out, In1, In2, Rest >, pdb::JoinCompBase< Out, In1, In2, Args... >, pdb::WriteUserSetBase< OutputClass >, pdb::MultiSelectionCompBase< OutputClass, InputClass >, pdb::SelectionCompBase< OutputClass, InputClass >, and pdb::AbstractPartitionComp< KeyClass, ValueClass >.
|
inlinevirtual |
to get number of nodes to collect aggregation results
Reimplemented in pdb::AggregateCompBase< OutputClass, InputClass, KeyClass, ValueClass >, and pdb::AggregateCompBase< TopKQueue< Score, ValueType >, InputClass, int, TopKQueue< Score, ValueType > >.
Definition at line 363 of file Computation.h.
|
inline |
Definition at line 341 of file Computation.h.
|
inline |
get output column name to apply if the node has been traversed already
Definition at line 283 of file Computation.h.
|
inline |
get output TupleSet name if the node has been traversed already
Definition at line 263 of file Computation.h.
|
pure virtual |
gets the output type of this query as a string
Implemented in pdb::ScanUserSetBase< OutputClass >, pdb::ScanUserSetBase< DoubleVector >, pdb::AggregateCompBase< OutputClass, InputClass, KeyClass, ValueClass >, pdb::AggregateCompBase< TopKQueue< Score, ValueType >, InputClass, int, TopKQueue< Score, ValueType > >, pdb::JoinCompBase< Out, In1, In2, Rest >, pdb::JoinCompBase< Out, In1, In2, Args... >, pdb::WriteUserSetBase< OutputClass >, pdb::MultiSelectionCompBase< OutputClass, InputClass >, pdb::SelectionCompBase< OutputClass, InputClass >, pdb::PartitionCompBase< KeyClass, ValueClass >, pdb::PartitionTransformationCompBase< KeyClass, ValueClass >, and pdb::AbstractPartitionComp< KeyClass, ValueClass >.
|
inlinevirtual |
Reimplemented in pdb::MultiSelectionCompBase< OutputClass, InputClass >, pdb::SelectionCompBase< OutputClass, InputClass >, pdb::PartitionCompBase< KeyClass, ValueClass >, pdb::AggregateCompBase< OutputClass, InputClass, KeyClass, ValueClass >, pdb::AggregateCompBase< TopKQueue< Score, ValueType >, InputClass, int, TopKQueue< Score, ValueType > >, pdb::PartitionTransformationCompBase< KeyClass, ValueClass >, pdb::ScanUserSetBase< OutputClass >, pdb::ScanUserSetBase< DoubleVector >, pdb::AbstractPartitionComp< KeyClass, ValueClass >, and pdb::WriteUserSetBase< OutputClass >.
Definition at line 309 of file Computation.h.
|
inlinevirtual |
interface for merging multiple join map sinks for broadcast join
Definition at line 104 of file Computation.h.
|
inlinevirtual |
Reimplemented in pdb::JoinCompBase< Out, In1, In2, Rest >, and pdb::JoinCompBase< Out, In1, In2, Args... >.
Definition at line 111 of file Computation.h.
|
inlinevirtual |
JiaNote: add below interface for shuffling multiple join map sinks for hash partitioned join.
Definition at line 120 of file Computation.h.
|
inlinevirtual |
Reimplemented in pdb::JoinCompBase< Out, In1, In2, Rest >, and pdb::JoinCompBase< Out, In1, In2, Args... >.
Definition at line 127 of file Computation.h.
|
inline |
Definition at line 151 of file Computation.h.
|
inlinevirtual |
to check whether to do collectAsMap
Reimplemented in pdb::AggregateCompBase< OutputClass, InputClass, KeyClass, ValueClass >, and pdb::AggregateCompBase< TopKQueue< Score, ValueType >, InputClass, int, TopKQueue< Score, ValueType > >.
Definition at line 355 of file Computation.h.
|
inline |
|
inlinevirtual |
Reimplemented in pdb::AbstractAggregateComp.
Definition at line 319 of file Computation.h.
|
inlinevirtual |
Reimplemented in pdb::SelectionCompBase< OutputClass, InputClass >, pdb::MultiSelectionCompBase< OutputClass, InputClass >, pdb::ScanUserSetBase< OutputClass >, pdb::ScanUserSetBase< DoubleVector >, pdb::WriteUserSetBase< OutputClass >, pdb::AbstractPartitionComp< KeyClass, ValueClass >, and pdb::AbstractAggregateComp.
Definition at line 313 of file Computation.h.
|
inline |
Definition at line 329 of file Computation.h.
|
inlinevirtual |
Reimplemented in pdb::MultiSelectionCompBase< OutputClass, InputClass >, pdb::SelectionCompBase< OutputClass, InputClass >, pdb::PartitionCompBase< KeyClass, ValueClass >, pdb::PartitionTransformationCompBase< KeyClass, ValueClass >, pdb::JoinCompBase< Out, In1, In2, Rest >, pdb::JoinCompBase< Out, In1, In2, Args... >, pdb::ScanUserSetBase< OutputClass >, pdb::ScanUserSetBase< DoubleVector >, pdb::AbstractPartitionComp< KeyClass, ValueClass >, and pdb::AbstractAggregateComp.
Definition at line 317 of file Computation.h.
|
inlinevirtual |
to set collectAsMap
collectAsMapOrNot |
Reimplemented in pdb::AggregateCompBase< OutputClass, InputClass, KeyClass, ValueClass >, and pdb::AggregateCompBase< TopKQueue< Score, ValueType >, InputClass, int, TopKQueue< Score, ValueType > >.
Definition at line 349 of file Computation.h.
|
inline |
Set the first slot, by default
toMe |
Definition at line 199 of file Computation.h.
|
inline |
sets the i^th input to be the output of a specific query... returns true if this is OK, false if it is not
whichSlot | |
toMe |
Definition at line 209 of file Computation.h.
|
inline |
Definition at line 190 of file Computation.h.
|
inlinevirtual |
to set number of nodes to collect aggregation results
numNodesToCollect |
Reimplemented in pdb::AggregateCompBase< OutputClass, InputClass, KeyClass, ValueClass >, and pdb::AggregateCompBase< TopKQueue< Score, ValueType >, InputClass, int, TopKQueue< Score, ValueType > >.
Definition at line 371 of file Computation.h.
|
inline |
Definition at line 333 of file Computation.h.
|
inlinevirtual |
set user set for output when necessary (e.g. results need to be materialized) by default it do nothing, subclasses shall override this function to handle the case when results need to be materialized.
Reimplemented in pdb::MultiSelectionCompBase< OutputClass, InputClass >, pdb::SelectionCompBase< OutputClass, InputClass >, pdb::PartitionCompBase< KeyClass, ValueClass >, pdb::ScanUserSetBase< OutputClass >, pdb::ScanUserSetBase< DoubleVector >, pdb::PartitionTransformationCompBase< KeyClass, ValueClass >, pdb::AbstractPartitionComp< KeyClass, ValueClass >, pdb::WriteUserSetBase< OutputClass >, pdb::AggregateCompBase< OutputClass, InputClass, KeyClass, ValueClass >, and pdb::AggregateCompBase< TopKQueue< Score, ValueType >, InputClass, int, TopKQueue< Score, ValueType > >.
Definition at line 303 of file Computation.h.
|
inline |
Set output column name to apply. This method should be invoked by the TCAP string generation method
Definition at line 294 of file Computation.h.
|
inline |
set output TupleSet name. This method should be invoked by the TCAP string generation method
outputTupleSetName |
Definition at line 275 of file Computation.h.
|
inline |
set the node to have been traversed
traversed |
Definition at line 254 of file Computation.h.
|
inlinevirtual |
Reimplemented in pdb::AbstractAggregateComp.
Definition at line 324 of file Computation.h.
|
pure virtual |
Implemented in pdb::JoinCompBase< Out, In1, In2, Rest >, pdb::JoinCompBase< Out, In1, In2, Args... >, pdb::AggregateCompBase< OutputClass, InputClass, KeyClass, ValueClass >, pdb::AggregateCompBase< TopKQueue< Score, ValueType >, InputClass, int, TopKQueue< Score, ValueType > >, pdb::ScanUserSetBase< OutputClass >, pdb::ScanUserSetBase< DoubleVector >, pdb::WriteUserSetBase< OutputClass >, pdb::MultiSelectionCompBase< OutputClass, InputClass >, pdb::SelectionCompBase< OutputClass, InputClass >, and pdb::AbstractPartitionComp< KeyClass, ValueClass >.
|
private |
Definition at line 375 of file Computation.h.
|
private |
Definition at line 385 of file Computation.h.
|
private |
Definition at line 387 of file Computation.h.
|
private |
Definition at line 383 of file Computation.h.
|
private |
Definition at line 381 of file Computation.h.
|
private |
Definition at line 379 of file Computation.h.
|
private |
Definition at line 377 of file Computation.h.