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.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
pdb::AbstractAggregateComp Class Referenceabstract

#include <AbstractAggregateComp.h>

+ Inheritance diagram for pdb::AbstractAggregateComp:
+ Collaboration diagram for pdb::AbstractAggregateComp:

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)
 

Detailed Description

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.

Constructor & Destructor Documentation

pdb::AbstractAggregateComp::AbstractAggregateComp ( )
default

We are using the default constructor

Member Function Documentation

virtual SimpleSingleTableQueryProcessorPtr pdb::AbstractAggregateComp::getAggOutProcessor ( )
pure virtual
virtual SimpleSingleTableQueryProcessorPtr pdb::AbstractAggregateComp::getAggregationProcessor ( HashPartitionID  id)
pure virtual

Used to get aggregation processor

Parameters
id- the id of the hash partition
Returns
the aggregation processor

Implemented in pdb::AggregateCompBase< OutputClass, InputClass, KeyClass, ValueClass >, and pdb::AggregateCompBase< TopKQueue< Score, ValueType >, InputClass, int, TopKQueue< Score, ValueType > >.

int pdb::AbstractAggregateComp::getBatchSize ( )
inline

Used to get the batch size

Returns

Definition at line 115 of file AbstractAggregateComp.h.

virtual SimpleSingleTableQueryProcessorPtr pdb::AbstractAggregateComp::getCombinerProcessor ( std::vector< HashPartitionID nodePartitionIds)
pure virtual

Used to get combiner processor

Parameters
nodePartitionIdsthe partition ids
Returns
- the combiner processor

Implemented in pdb::AggregateCompBase< OutputClass, InputClass, KeyClass, ValueClass >, and pdb::AggregateCompBase< TopKQueue< Score, ValueType >, InputClass, int, TopKQueue< Score, ValueType > >.

ComputationTypeID pdb::AbstractAggregateComp::getComputationTypeID ( )
inlineoverridevirtual
int pdb::AbstractAggregateComp::getNumNodes ( )
inline

Used to get number of nodes

Returns
the number of nodes

Definition at line 99 of file AbstractAggregateComp.h.

int pdb::AbstractAggregateComp::getNumPartitions ( )
inline

Used to get the number of partitions

Returns
the number of partitions

Definition at line 82 of file AbstractAggregateComp.h.

bool pdb::AbstractAggregateComp::isUsingCombiner ( )
inlineoverridevirtual

Is this aggregation using a combiner

Returns
true if it does false otherwise

Reimplemented from pdb::Computation.

Definition at line 172 of file AbstractAggregateComp.h.

+ Here is the caller graph for this function:

bool pdb::AbstractAggregateComp::needsMaterializeOutput ( )
inlineoverridevirtual

Does this aggregation need materialization

Returns
true if it does

Reimplemented from pdb::Computation.

Definition at line 155 of file AbstractAggregateComp.h.

void pdb::AbstractAggregateComp::setBatchSize ( int  batchSize)
inlineoverridevirtual

Used to set the batch size

Parameters
batchSize- the new batch size

Reimplemented from pdb::Computation.

Definition at line 107 of file AbstractAggregateComp.h.

virtual void pdb::AbstractAggregateComp::setDatabaseName ( std::string  dbName)
pure virtual
void pdb::AbstractAggregateComp::setHashTable ( void *  hashTableLocation)
inline

Sets the hash table pointer

Parameters
hashTableLocation- the pointer to the hash table

Definition at line 163 of file AbstractAggregateComp.h.

virtual void pdb::AbstractAggregateComp::setIterator ( PageCircularBufferIteratorPtr  iterator)
pure virtual
void pdb::AbstractAggregateComp::setNumNodes ( int  numNodes)
inline

Used to set number of nodes

Parameters
numNodes- the new number of nodes

Definition at line 90 of file AbstractAggregateComp.h.

void pdb::AbstractAggregateComp::setNumPartitions ( int  numPartitions)
inline

Used to set number of partitions

Parameters
numPartitions- the new number of partitions

Definition at line 73 of file AbstractAggregateComp.h.

virtual void pdb::AbstractAggregateComp::setProxy ( DataProxyPtr  proxy)
pure virtual
virtual void pdb::AbstractAggregateComp::setSetName ( std::string  setName)
pure virtual
void pdb::AbstractAggregateComp::setUsingCombiner ( bool  useCombinerOrNot)
inlineoverridevirtual

Set an indicator that says if this aggregation is using a combiner or not

Parameters
useCombinerOrNot- true if does false otherwise

Reimplemented from pdb::Computation.

Definition at line 180 of file AbstractAggregateComp.h.

Member Data Documentation

int pdb::AbstractAggregateComp::batchSize = -1
protected

The size of the batch

Definition at line 199 of file AbstractAggregateComp.h.

bool pdb::AbstractAggregateComp::materializeAggOut = false
protected

Materialize the aggregation output or not

Definition at line 209 of file AbstractAggregateComp.h.

int pdb::AbstractAggregateComp::numNodes = -1
protected

Number of nodes in the cluster

Definition at line 194 of file AbstractAggregateComp.h.

int pdb::AbstractAggregateComp::numPartitions = -1
protected

Number of partitions in the cluster

Definition at line 189 of file AbstractAggregateComp.h.

bool pdb::AbstractAggregateComp::useCombinerOrNot = true
protected

Does this aggregation have a combiner

Definition at line 214 of file AbstractAggregateComp.h.

void* pdb::AbstractAggregateComp::whereHashTableSitsForThePartition = nullptr
protected

A pointer to the hash table

Definition at line 204 of file AbstractAggregateComp.h.


The documentation for this class was generated from the following file: