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 <AbstractAggregateComp.h>
Public Member Functions | |
AbstractAggregateComp ()=default | |
virtual SimpleSingleTableQueryProcessorPtr | getCombinerProcessor (std::vector< HashPartitionID > nodePartitionIds)=0 |
virtual SimpleSingleTableQueryProcessorPtr | getAggregationProcessor (HashPartitionID id)=0 |
virtual SimpleSingleTableQueryProcessorPtr | getAggOutProcessor ()=0 |
void | setNumPartitions (int numPartitions) |
int | getNumPartitions () |
void | setNumNodes (int numNodes) |
int | getNumNodes () |
void | setBatchSize (int batchSize) override |
int | getBatchSize () |
virtual void | setIterator (PageCircularBufferIteratorPtr iterator)=0 |
virtual void | setProxy (DataProxyPtr proxy)=0 |
virtual void | setDatabaseName (std::string dbName)=0 |
virtual void | setSetName (std::string setName)=0 |
ComputationTypeID | getComputationTypeID () override |
bool | needsMaterializeOutput () override |
void | setHashTable (void *hashTableLocation) |
bool | isUsingCombiner () override |
void | setUsingCombiner (bool useCombinerOrNot) override |
Public Member Functions inherited from pdb::Computation | |
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 |
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 () |
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) |
Protected Attributes | |
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) |
This class defines the interfaces for AggregateComp This class is used in backend when type information is unknown
Definition at line 37 of file AbstractAggregateComp.h.
|
default |
We are using the default constructor
|
pure virtual |
Used to get the agg out processor
Implemented in pdb::AggregateCompBase< OutputClass, InputClass, KeyClass, ValueClass >, and pdb::AggregateCompBase< TopKQueue< Score, ValueType >, InputClass, int, TopKQueue< Score, ValueType > >.
|
pure virtual |
Used to get aggregation processor
id | - the id of the hash partition |
Implemented in pdb::AggregateCompBase< OutputClass, InputClass, KeyClass, ValueClass >, and pdb::AggregateCompBase< TopKQueue< Score, ValueType >, InputClass, int, TopKQueue< Score, ValueType > >.
|
inline |
|
pure virtual |
Used to get combiner processor
nodePartitionIds | the partition ids |
Implemented in pdb::AggregateCompBase< OutputClass, InputClass, KeyClass, ValueClass >, and pdb::AggregateCompBase< TopKQueue< Score, ValueType >, InputClass, int, TopKQueue< Score, ValueType > >.
|
inlineoverridevirtual |
Used to return the type if of this computation
Implements pdb::Computation.
Reimplemented in pdb::AggregateCompBase< OutputClass, InputClass, KeyClass, ValueClass >, and pdb::AggregateCompBase< TopKQueue< Score, ValueType >, InputClass, int, TopKQueue< Score, ValueType > >.
Definition at line 147 of file AbstractAggregateComp.h.
|
inline |
Used to get number of nodes
Definition at line 99 of file AbstractAggregateComp.h.
|
inline |
Used to get the number of partitions
Definition at line 82 of file AbstractAggregateComp.h.
|
inlineoverridevirtual |
Is this aggregation using a combiner
Reimplemented from pdb::Computation.
Definition at line 172 of file AbstractAggregateComp.h.
|
inlineoverridevirtual |
Does this aggregation need materialization
Reimplemented from pdb::Computation.
Definition at line 155 of file AbstractAggregateComp.h.
|
inlineoverridevirtual |
Used to set the batch size
batchSize | - the new batch size |
Reimplemented from pdb::Computation.
Definition at line 107 of file AbstractAggregateComp.h.
|
pure virtual |
Used to set database name
dbName |
Implemented in pdb::AggregateCompBase< OutputClass, InputClass, KeyClass, ValueClass >, and pdb::AggregateCompBase< TopKQueue< Score, ValueType >, InputClass, int, TopKQueue< Score, ValueType > >.
|
inline |
Sets the hash table pointer
hashTableLocation | - the pointer to the hash table |
Definition at line 163 of file AbstractAggregateComp.h.
|
pure virtual |
Used to set iterator for reading from output
iterator | - the iterator |
Implemented in pdb::AggregateCompBase< OutputClass, InputClass, KeyClass, ValueClass >, and pdb::AggregateCompBase< TopKQueue< Score, ValueType >, InputClass, int, TopKQueue< Score, ValueType > >.
|
inline |
Used to set number of nodes
numNodes | - the new number of nodes |
Definition at line 90 of file AbstractAggregateComp.h.
|
inline |
Used to set number of partitions
numPartitions | - the new number of partitions |
Definition at line 73 of file AbstractAggregateComp.h.
|
pure virtual |
Used to set proxy for reading from output
proxy | - the proxy |
Implemented in pdb::AggregateCompBase< OutputClass, InputClass, KeyClass, ValueClass >, and pdb::AggregateCompBase< TopKQueue< Score, ValueType >, InputClass, int, TopKQueue< Score, ValueType > >.
|
pure virtual |
Used to set the set name
setName |
Implemented in pdb::AggregateCompBase< OutputClass, InputClass, KeyClass, ValueClass >, and pdb::AggregateCompBase< TopKQueue< Score, ValueType >, InputClass, int, TopKQueue< Score, ValueType > >.
|
inlineoverridevirtual |
Set an indicator that says if this aggregation is using a combiner or not
useCombinerOrNot | - true if does false otherwise |
Reimplemented from pdb::Computation.
Definition at line 180 of file AbstractAggregateComp.h.
|
protected |
The size of the batch
Definition at line 199 of file AbstractAggregateComp.h.
|
protected |
Materialize the aggregation output or not
Definition at line 209 of file AbstractAggregateComp.h.
|
protected |
Number of nodes in the cluster
Definition at line 194 of file AbstractAggregateComp.h.
|
protected |
Number of partitions in the cluster
Definition at line 189 of file AbstractAggregateComp.h.
|
protected |
Does this aggregation have a combiner
Definition at line 214 of file AbstractAggregateComp.h.
|
protected |
A pointer to the hash table
Definition at line 204 of file AbstractAggregateComp.h.