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

#include <PartitionTransformationCompBase.h>

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

Public Member Functions

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

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)
 
- Protected Attributes inherited from pdb::AbstractPartitionComp< KeyClass, ValueClass >
bool materializeSelectionOut = false
 
int numPartitions = 16
 
int numNodes = 2
 

Detailed Description

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

Definition at line 31 of file PartitionTransformationCompBase.h.

Member Function Documentation

template<class KeyClass , class ValueClass >
void pdb::PartitionTransformationCompBase< KeyClass, ValueClass >::extractLambdas ( std::map< std::string, GenericLambdaObjectPtr > &  returnVal)
inlineoverridevirtual

calls getProjection to extract the lambdas

Parameters
returnValthe populated lambda map

Reimplemented from pdb::Computation.

Definition at line 49 of file PartitionTransformationCompBase.h.

+ Here is the call graph for this function:

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

Reimplemented from pdb::AbstractPartitionComp< KeyClass, ValueClass >.

Definition at line 61 of file PartitionTransformationCompBase.h.

+ Here is the caller graph for this function:

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

Reimplemented from pdb::AbstractPartitionComp< KeyClass, ValueClass >.

Definition at line 68 of file PartitionTransformationCompBase.h.

template<class KeyClass , class ValueClass >
ComputeSinkPtr pdb::PartitionTransformationCompBase< 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::AbstractPartitionComp< KeyClass, ValueClass >.

Definition at line 210 of file PartitionTransformationCompBase.h.

template<class KeyClass , class ValueClass >
ComputeSourcePtr pdb::PartitionTransformationCompBase< 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::AbstractPartitionComp< KeyClass, ValueClass >.

Definition at line 191 of file PartitionTransformationCompBase.h.

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

Reimplemented from pdb::AbstractPartitionComp< KeyClass, ValueClass >.

Definition at line 166 of file PartitionTransformationCompBase.h.

template<class KeyClass , class ValueClass >
Handle<ScanUserSet<KeyClass> >& pdb::PartitionTransformationCompBase< KeyClass, ValueClass >::getOutputSetScanner ( )
inline
Returns
: a scanner that can be used to read the output of this computation

Definition at line 224 of file PartitionTransformationCompBase.h.

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

Reimplemented from pdb::AbstractPartitionComp< KeyClass, ValueClass >.

Definition at line 76 of file PartitionTransformationCompBase.h.

template<class KeyClass , class ValueClass >
virtual Lambda<KeyClass> pdb::PartitionTransformationCompBase< KeyClass, ValueClass >::getProjection ( Handle< ValueClass >  checkMe)
pure virtual

the computation returned by this method is called to perfom a transformation on the input item before it is inserted into the output set

Parameters
checkMethe input data element
Returns
: a Lambda in tree form to be called to perform transformation on the input to an output, which must have hash function defined.

Implemented in pdb::PartitionTransformationComp< KeyClass, ValueClass >.

+ Here is the caller graph for this function:

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

Reimplemented from pdb::AbstractPartitionComp< KeyClass, ValueClass >.

Definition at line 177 of file PartitionTransformationCompBase.h.

template<class KeyClass , class ValueClass >
void pdb::PartitionTransformationCompBase< 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::AbstractPartitionComp< KeyClass, ValueClass >.

Definition at line 157 of file PartitionTransformationCompBase.h.

template<class KeyClass , class ValueClass >
void pdb::PartitionTransformationCompBase< 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::AbstractPartitionComp< KeyClass, ValueClass >.

Definition at line 145 of file PartitionTransformationCompBase.h.

template<class KeyClass , class ValueClass >
std::string pdb::PartitionTransformationCompBase< 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 
)
inlineoverridevirtual
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

Implements pdb::AbstractPartitionComp< KeyClass, ValueClass >.

Definition at line 93 of file PartitionTransformationCompBase.h.

+ Here is the call graph for this function:

Member Data Documentation

template<class KeyClass , class ValueClass >
Handle<ScanUserSet<KeyClass> > pdb::PartitionTransformationCompBase< KeyClass, ValueClass >::outputSetScanner = nullptr
private

Definition at line 230 of file PartitionTransformationCompBase.h.


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