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::AbstractPartitionComp< KeyClass, ValueClass > Class Template Referenceabstract

#include <AbstractPartitionComp.h>

+ Inheritance diagram for pdb::AbstractPartitionComp< KeyClass, ValueClass >:
+ Collaboration diagram for pdb::AbstractPartitionComp< KeyClass, ValueClass >:

Public Member Functions

virtual std::string getComputationType () override
 
virtual ComputationTypeID getComputationTypeID () override
 
std::string getIthInputType (int i) override
 
int getNumInputs () override
 
virtual std::string getOutputType () override
 
std::string toTCAPString (std::vector< InputTupleSetSpecifier > &inputTupleSets, int computationLabel, std::string &outputTupleSetName, std::vector< std::string > &outputColumnNames, std::string &addedOutputColumnName) override
 
virtual 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)=0
 
virtual void setOutput (std::string dbName, std::string setName) override
 
virtual void setBatchSize (int batchSize) override
 
virtual std::string getDatabaseName () override
 
std::string getSetName () override
 
virtual ComputeSourcePtr getComputeSource (TupleSpec &outputScheme, ComputePlan &plan) override
 
virtual ComputeSinkPtr getComputeSink (TupleSpec &consumeMe, TupleSpec &projection, ComputePlan &plan) override
 
bool needsMaterializeOutput () override
 
void setNumPartitions (int numPartitions)
 
int getNumPartitions ()
 
void setNumNodes (int numNodes)
 
int getNumNodes ()
 
- Public Member Functions inherited from pdb::Computation
virtual void extractLambdas (std::map< std::string, GenericLambdaObjectPtr > &returnVal)
 
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)
 
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)
 

Protected Attributes

bool materializeSelectionOut = false
 
int numPartitions = 16
 
int numNodes = 2
 

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

template<class KeyClass, class ValueClass>
class pdb::AbstractPartitionComp< KeyClass, ValueClass >

Definition at line 29 of file AbstractPartitionComp.h.

Member Function Documentation

template<class KeyClass , class ValueClass >
virtual std::string pdb::AbstractPartitionComp< KeyClass, ValueClass >::getComputationType ( )
inlineoverridevirtual
Returns
the type of this computation

Implements pdb::Computation.

Reimplemented in pdb::PartitionCompBase< KeyClass, ValueClass >, and pdb::PartitionTransformationCompBase< KeyClass, ValueClass >.

Definition at line 37 of file AbstractPartitionComp.h.

template<class KeyClass , class ValueClass >
virtual ComputationTypeID pdb::AbstractPartitionComp< KeyClass, ValueClass >::getComputationTypeID ( )
inlineoverridevirtual
Returns
: the type id of this computation

Implements pdb::Computation.

Reimplemented in pdb::PartitionCompBase< KeyClass, ValueClass >, and pdb::PartitionTransformationCompBase< KeyClass, ValueClass >.

Definition at line 44 of file AbstractPartitionComp.h.

template<class KeyClass , class ValueClass >
virtual ComputeSinkPtr pdb::AbstractPartitionComp< KeyClass, ValueClass >::getComputeSink ( TupleSpec consumeMe,
TupleSpec projection,
ComputePlan plan 
)
inlineoverridevirtual

Sink to write partition output

Parameters
consumeMethe tuple set scheme of the compute sink
projectionthe tuple set scheme of the projection
planthe computation plan
Returns
: the sink to this computation

Reimplemented from pdb::Computation.

Reimplemented in pdb::PartitionCompBase< KeyClass, ValueClass >, and pdb::PartitionTransformationCompBase< KeyClass, ValueClass >.

Definition at line 173 of file AbstractPartitionComp.h.

template<class KeyClass , class ValueClass >
virtual ComputeSourcePtr pdb::AbstractPartitionComp< KeyClass, ValueClass >::getComputeSource ( TupleSpec outputScheme,
ComputePlan plan 
)
inlineoverridevirtual

source for consumer to read selection output, which has been written to a user set

Parameters
outputSchemethe tuple set scheme of the compute source
planthe computation plan
Returns
: the source to this computation

Reimplemented from pdb::Computation.

Reimplemented in pdb::PartitionCompBase< KeyClass, ValueClass >, and pdb::PartitionTransformationCompBase< KeyClass, ValueClass >.

Definition at line 162 of file AbstractPartitionComp.h.

template<class KeyClass , class ValueClass >
virtual std::string pdb::AbstractPartitionComp< KeyClass, ValueClass >::getDatabaseName ( )
inlineoverridevirtual
Returns
: the database name

Reimplemented from pdb::Computation.

Reimplemented in pdb::PartitionCompBase< KeyClass, ValueClass >, and pdb::PartitionTransformationCompBase< KeyClass, ValueClass >.

Definition at line 145 of file AbstractPartitionComp.h.

template<class KeyClass , class ValueClass >
std::string pdb::AbstractPartitionComp< KeyClass, ValueClass >::getIthInputType ( int  i)
inlineoverridevirtual
Parameters
ithe index of the input element that we want to know the type
Returns
: the name of the i^th input type...

Implements pdb::Computation.

Definition at line 52 of file AbstractPartitionComp.h.

template<class KeyClass , class ValueClass >
int pdb::AbstractPartitionComp< KeyClass, ValueClass >::getNumInputs ( )
inlineoverridevirtual
Returns
: the number of inputs to this query type

Implements pdb::Computation.

Definition at line 63 of file AbstractPartitionComp.h.

template<class KeyClass , class ValueClass >
int pdb::AbstractPartitionComp< KeyClass, ValueClass >::getNumNodes ( )
inline
Returns
: number of nodes for this partition computation

Definition at line 212 of file AbstractPartitionComp.h.

template<class KeyClass , class ValueClass >
int pdb::AbstractPartitionComp< KeyClass, ValueClass >::getNumPartitions ( )
inline
Returns
: number of partitions for this partition computation

Definition at line 198 of file AbstractPartitionComp.h.

template<class KeyClass , class ValueClass >
virtual std::string pdb::AbstractPartitionComp< KeyClass, ValueClass >::getOutputType ( )
inlineoverridevirtual
Returns
: the output type of this query as a string

Implements pdb::Computation.

Reimplemented in pdb::PartitionCompBase< KeyClass, ValueClass >, and pdb::PartitionTransformationCompBase< KeyClass, ValueClass >.

Definition at line 70 of file AbstractPartitionComp.h.

template<class KeyClass , class ValueClass >
std::string pdb::AbstractPartitionComp< KeyClass, ValueClass >::getSetName ( )
inlineoverridevirtual
Returns
: the set name

Reimplemented from pdb::Computation.

Reimplemented in pdb::PartitionCompBase< KeyClass, ValueClass >, and pdb::PartitionTransformationCompBase< KeyClass, ValueClass >.

Definition at line 152 of file AbstractPartitionComp.h.

template<class KeyClass , class ValueClass >
bool pdb::AbstractPartitionComp< KeyClass, ValueClass >::needsMaterializeOutput ( )
inlineoverridevirtual
Returns
: whether the output of this computation is required to be materialized

Reimplemented from pdb::Computation.

Definition at line 183 of file AbstractPartitionComp.h.

template<class KeyClass , class ValueClass >
virtual void pdb::AbstractPartitionComp< KeyClass, ValueClass >::setBatchSize ( int  batchSize)
inlineoverridevirtual

to set the batch size for this computation

Parameters
batchSizethe size of processing batches for this computation

Reimplemented from pdb::Computation.

Reimplemented in pdb::PartitionCompBase< KeyClass, ValueClass >, and pdb::PartitionTransformationCompBase< KeyClass, ValueClass >.

Definition at line 140 of file AbstractPartitionComp.h.

template<class KeyClass , class ValueClass >
void pdb::AbstractPartitionComp< KeyClass, ValueClass >::setNumNodes ( int  numNodes)
inline
Parameters
numNodesto set the number of nodes for this computation

Definition at line 205 of file AbstractPartitionComp.h.

template<class KeyClass , class ValueClass >
void pdb::AbstractPartitionComp< KeyClass, ValueClass >::setNumPartitions ( int  numPartitions)
inline
Parameters
numPartitionsto set the number of partitions for this computation

Definition at line 191 of file AbstractPartitionComp.h.

template<class KeyClass , class ValueClass >
virtual void pdb::AbstractPartitionComp< KeyClass, ValueClass >::setOutput ( std::string  dbName,
std::string  setName 
)
inlineoverridevirtual

to specify the output set for this computation

Parameters
dbNamethe name of the database
setNamethe name of the set

Reimplemented from pdb::Computation.

Reimplemented in pdb::PartitionCompBase< KeyClass, ValueClass >, and pdb::PartitionTransformationCompBase< KeyClass, ValueClass >.

Definition at line 133 of file AbstractPartitionComp.h.

template<class KeyClass , class ValueClass >
std::string pdb::AbstractPartitionComp< KeyClass, ValueClass >::toTCAPString ( std::vector< InputTupleSetSpecifier > &  inputTupleSets,
int  computationLabel,
std::string &  outputTupleSetName,
std::vector< std::string > &  outputColumnNames,
std::string &  addedOutputColumnName 
)
inlineoverridevirtual

below function implements the interface for parsing computation into a TCAP string

Parameters
inputTupleSetsidentifiers to input tuple sets
computationLabelthe sequence number of this computation
outputTupleSetNamethe name of the tuple set that is resulted from this computation
outputColumnNamesthe column names in the tuple set that is resulted from this computation
addedOutputColumnNamethe appended column name in the tuple set that is resulted from this computation
Returns
: the TCAP string represent this computation

Implements pdb::Computation.

Definition at line 83 of file AbstractPartitionComp.h.

+ Here is the call graph for this function:

template<class KeyClass , class ValueClass >
virtual std::string pdb::AbstractPartitionComp< KeyClass, ValueClass >::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 
)
pure virtual
Parameters
inputTupleSetNameidentifiers to input tuple sets
inputColumnNamesthe sequence number of this computation
inputColumnsToApplythe names of the input columns in the input tuple sets that will be used in the computation
childrenLambdaNamesthe extracted lambda names for this TCAP
computationLabelthe sequence number of this computation
outputTupleSetNamethe name of the output tuple set that is resulted from this computation
outputColumnNamesthe column names of the output tuple set that is resulted from this computation
addedOutputColumnNamethe name of the newly appended column
myLambdaName
Returns
: the tcap string for this computation

Implemented in pdb::PartitionCompBase< KeyClass, ValueClass >, and pdb::PartitionTransformationCompBase< KeyClass, ValueClass >.

Member Data Documentation

template<class KeyClass , class ValueClass >
bool pdb::AbstractPartitionComp< KeyClass, ValueClass >::materializeSelectionOut = false
protected

Definition at line 218 of file AbstractPartitionComp.h.

template<class KeyClass , class ValueClass >
int pdb::AbstractPartitionComp< KeyClass, ValueClass >::numNodes = 2
protected

Definition at line 220 of file AbstractPartitionComp.h.

template<class KeyClass , class ValueClass >
int pdb::AbstractPartitionComp< KeyClass, ValueClass >::numPartitions = 16
protected

Definition at line 219 of file AbstractPartitionComp.h.


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