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 <AggregateCompBase.h>
Public Member Functions | |
virtual Lambda< KeyClass > | getKeyProjection (Handle< InputClass > aggMe)=0 |
virtual Lambda< ValueClass > | getValueProjection (Handle< InputClass > aggMe)=0 |
void | setOutput (std::string dbName, std::string setName) override |
void | setHashTablePointer (void *hashTablePointer) |
void | extractLambdas (std::map< std::string, GenericLambdaObjectPtr > &returnVal) override |
ComputeSinkPtr | getComputeSink (TupleSpec &consumeMe, TupleSpec &projection, ComputePlan &plan) override |
ComputeSourcePtr | getComputeSource (TupleSpec &outputScheme, ComputePlan &plan) override |
SimpleSingleTableQueryProcessorPtr | getCombinerProcessor (std::vector< HashPartitionID > partitions) override |
SimpleSingleTableQueryProcessorPtr | getAggregationProcessor (HashPartitionID id) override |
SimpleSingleTableQueryProcessorPtr | getAggOutProcessor () override |
void | setIterator (PageCircularBufferIteratorPtr iterator) override |
void | setProxy (DataProxyPtr proxy) override |
void | setDatabaseName (std::string dbName) override |
void | setSetName (std::string setName) override |
std::string | getDatabaseName () override |
std::string | getSetName () override |
std::string | getComputationType () override |
ComputationTypeID | getComputationTypeID () override |
std::string | getOutputType () override |
int | getNumInputs () override |
std::string | getIthInputType (int i) override |
void | setCollectAsMap (bool collectAsMapOrNot) override |
bool | isCollectAsMap () override |
int | getNumNodesToCollect () override |
void | setNumNodesToCollect (int numNodesToCollect) override |
std::string | toTCAPString (std::vector< InputTupleSetSpecifier > &inputTupleSets, int computationLabel, std::string &outputTupleSetName, std::vector< std::string > &outputColumnNames, std::string &addedOutputColumnName) override |
std::string | toTCAPString (std::string inputTupleSetName, std::vector< std::string > &inputColumnNames, std::vector< std::string > &inputColumnsToApply, std::vector< std::string > &childrenLambdaNames, int computationLabel, std::string &outputTupleSetName, std::vector< std::string > &outputColumnNames, std::string &addedOutputColumnName, std::string &myLambdaName) |
Handle< ScanUserSet < OutputClass > > & | getOutputSetScanner () |
Public Member Functions inherited from pdb::AbstractAggregateComp | |
AbstractAggregateComp ()=default | |
void | setNumPartitions (int numPartitions) |
int | getNumPartitions () |
void | setNumNodes (int numNodes) |
int | getNumNodes () |
void | setBatchSize (int batchSize) override |
int | getBatchSize () |
bool | needsMaterializeOutput () override |
void | setHashTable (void *hashTableLocation) |
bool | isUsingCombiner () override |
void | setUsingCombiner (bool useCombinerOrNot) override |
Public Member Functions inherited from pdb::Computation | |
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) |
bool | hasInput () |
Handle< Computation > & | getIthInput (int i) const |
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) |
void | setAllocatorPolicy (AllocatorPolicy myPolicy) |
void | setObjectPolicy (ObjectPolicy myPolicy) |
AllocatorPolicy | getAllocatorPolicy () |
ObjectPolicy | getObjectPolicy () |
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) |
Protected Attributes | |
Handle< ScanUserSet < OutputClass > > | outputSetScanner = nullptr |
bool | collectAsMapOrNot = false |
int | numNodesToCollect = 1 |
Protected Attributes inherited from pdb::AbstractAggregateComp | |
int | numPartitions = -1 |
int | numNodes = -1 |
int | batchSize = -1 |
void * | whereHashTableSitsForThePartition = nullptr |
bool | materializeAggOut = false |
bool | useCombinerOrNot = true |
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) |
Definition at line 16 of file AggregateCompBase.h.
|
inlineoverridevirtual |
Extract the key projection and value projection lambdas
returnVal | - the extracted lambdas |
Reimplemented from pdb::Computation.
Definition at line 59 of file AggregateCompBase.h.
|
inlineoverridevirtual |
Used to return processor for writing aggregation results to a user set the agg out processor is used in the aggregation consuming phase for materializing aggregation results to user set the input is the output of aggregation processor the output is written to a user set
Implements pdb::AbstractAggregateComp.
Definition at line 154 of file AggregateCompBase.h.
|
inlineoverridevirtual |
Used to return processor for aggregating on shuffle data the aggregation processor is used in the aggregation consuming phase the input is shuffle data the output are intermediate pages of arbitrary size allocated on heap
id |
Implements pdb::AbstractAggregateComp.
Definition at line 143 of file AggregateCompBase.h.
|
inlineoverridevirtual |
Used to return processor for combining data written to shuffle sink the combiner processor is used in the end of aggregation producing phase the input is data written to shuffle sink the output is data for shuffling
partitions |
Implements pdb::AbstractAggregateComp.
Definition at line 130 of file AggregateCompBase.h.
|
inlineoverridevirtual |
this is an aggregation comp
Implements pdb::Computation.
Definition at line 210 of file AggregateCompBase.h.
|
inlineoverridevirtual |
Used to return the type if of this computation
Reimplemented from pdb::AbstractAggregateComp.
Definition at line 218 of file AggregateCompBase.h.
|
inlineoverridevirtual |
Sink for aggregation producing phase output, shuffle data will be combined from the sink
consumeMe | - |
projection | - |
plan | - |
Reimplemented from pdb::Computation.
Definition at line 75 of file AggregateCompBase.h.
|
inlineoverridevirtual |
source for consumer to read aggregation results, aggregation results are written to user set
outputScheme | |
plan |
Reimplemented from pdb::Computation.
Definition at line 101 of file AggregateCompBase.h.
|
inlineoverridevirtual |
Used to return the database name
Reimplemented from pdb::Computation.
Definition at line 194 of file AggregateCompBase.h.
|
inlineoverridevirtual |
Used to get the name of the i^th input type...
i | - return the i-th input type |
Implements pdb::Computation.
Definition at line 243 of file AggregateCompBase.h.
|
pure virtual |
Gets the operation the extracts a key from an input object
aggMe | - the object we want to the the operation from |
Implemented in pdb::AggregateComp< OutputClass, InputClass, KeyClass, ValueClass >, pdb::AggregateComp< TopKQueue< Score, ValueType >, InputClass, int, TopKQueue< Score, ValueType > >, and pdb::TopKComp< InputClass, Score, ValueType >.
|
inlineoverridevirtual |
Used to get the number of inputs to this query type
Implements pdb::Computation.
Definition at line 234 of file AggregateCompBase.h.
|
inlineoverridevirtual |
to get number of nodes to collect aggregation results
Reimplemented from pdb::Computation.
Definition at line 267 of file AggregateCompBase.h.
|
inline |
Definition at line 422 of file AggregateCompBase.h.
|
inlineoverridevirtual |
Used to get output type
Implements pdb::Computation.
Definition at line 226 of file AggregateCompBase.h.
|
inlineoverridevirtual |
Used to return the set name
Reimplemented from pdb::Computation.
Definition at line 202 of file AggregateCompBase.h.
|
pure virtual |
Gets the operation the extracts a value from an input object
aggMe | - the object we want to the the operation from |
Implemented in pdb::AggregateComp< OutputClass, InputClass, KeyClass, ValueClass >, pdb::AggregateComp< TopKQueue< Score, ValueType >, InputClass, int, TopKQueue< Score, ValueType > >, and pdb::TopKComp< InputClass, Score, ValueType >.
|
inlineoverridevirtual |
Is the aggregation collected on the first 0 to numNodesToCollect
Reimplemented from pdb::Computation.
Definition at line 263 of file AggregateCompBase.h.
|
inlineoverridevirtual |
Should the aggregation result be collected on the first 0 to numNodesToCollect
collectAsMapOrNot | - true if it should false otherwise |
Reimplemented from pdb::Computation.
Definition at line 255 of file AggregateCompBase.h.
|
inlineoverridevirtual |
Used to set the database name
dbName |
Implements pdb::AbstractAggregateComp.
Definition at line 178 of file AggregateCompBase.h.
|
inline |
Set hash table pointer
hashTablePointer | - a pointer to the hash table for this aggregation |
Definition at line 51 of file AggregateCompBase.h.
|
inlineoverridevirtual |
Used to set iterator for scanning the materialized aggregation output that is stored in a user set
iterator |
Implements pdb::AbstractAggregateComp.
Definition at line 162 of file AggregateCompBase.h.
|
inlineoverridevirtual |
to set number of nodes to collect aggregation results
numNodesToCollect |
Reimplemented from pdb::Computation.
Definition at line 271 of file AggregateCompBase.h.
|
inlineoverridevirtual |
Materialize aggregation output, use ScanUserSet to obtain consumer's ComputeSource
dbName | - the name of the database we are materializing to |
setName | - the name of the set we are materializing to |
Reimplemented from pdb::Computation.
Definition at line 38 of file AggregateCompBase.h.
|
inlineoverridevirtual |
Used to set data proxy for scanning the materialized aggregation output that is stored in a user set
proxy |
Implements pdb::AbstractAggregateComp.
Definition at line 170 of file AggregateCompBase.h.
|
inlineoverridevirtual |
Used to set the set name
setName |
Implements pdb::AbstractAggregateComp.
Definition at line 186 of file AggregateCompBase.h.
|
inlineoverridevirtual |
Below function implements the interface for parsing computation into a TCAP string
inputTupleSets | |
computationLabel | |
outputTupleSetName | |
outputColumnNames | |
addedOutputColumnName |
Implements pdb::Computation.
Definition at line 284 of file AggregateCompBase.h.
|
inline |
Used to return Aggregate tcap string
inputTupleSetName | |
inputColumnNames | |
inputColumnsToApply | |
childrenLambdaNames | |
computationLabel | |
outputTupleSetName | |
outputColumnNames | |
addedOutputColumnName | |
myLambdaName |
Definition at line 322 of file AggregateCompBase.h.
|
protected |
If this parameter is set the aggregation result will be collected on the first 0 to numNodesToCollect
Definition at line 436 of file AggregateCompBase.h.
|
protected |
The number of nodes we want to collect the aggregation results on, ignored if
Definition at line 441 of file AggregateCompBase.h.
|
protected |
Output set scanner
Definition at line 431 of file AggregateCompBase.h.