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::AdvancedPhysicalAbstractAlgorithm Class Referenceabstract

#include <AdvancedPhysicalAbstractAlgorithm.h>

+ Inheritance diagram for pdb::AdvancedPhysicalAbstractAlgorithm:
+ Collaboration diagram for pdb::AdvancedPhysicalAbstractAlgorithm:

Public Member Functions

 AdvancedPhysicalAbstractAlgorithm (const AdvancedPhysicalPipelineNodePtr &handle, const std::string &jobID, bool isProbing, bool isOutput, Handle< SetIdentifier > source, Handle< ComputePlan > computePlan, const LogicalPlanPtr &logicalPlan, const ConfigurationPtr &conf)
 
virtual PhysicalOptimizerResultPtr generate (int nextStageID, const StatisticsPtr &stats)=0
 
virtual PhysicalOptimizerResultPtr generatePipelined (int nextStageID, const StatisticsPtr &stats, std::vector< AdvancedPhysicalPipelineNodePtr > &pipesToPipeline)
 
virtual
AdvancedPhysicalAbstractAlgorithmTypeID 
getType ()=0
 

Protected Member Functions

virtual DataStatistics approximateResultSize (const StatisticsPtr &stats)
 
void updateConsumers (const Handle< SetIdentifier > &sink, DataStatistics approxSize, const StatisticsPtr &stats)
 
void includeHashComputation ()
 
void extractAtomicComputations ()
 
void extractHashSetsToProbe ()
 

Protected Attributes

std::list
< AdvancedPhysicalPipelineNodePtr
pipeline
 
std::string jobID
 
list< AtomicComputationPtrpipelineComputations
 
unordered_map< std::string,
std::string > 
probingHashSets
 
LogicalPlanPtr logicalPlan
 
Handle< ComputePlancomputePlan
 
ConfigurationPtr conf
 
Handle< SetIdentifiersink
 
Handle< SetIdentifiersource
 
bool isProbing
 
bool isOutput
 

Detailed Description

Definition at line 39 of file AdvancedPhysicalAbstractAlgorithm.h.

Constructor & Destructor Documentation

AdvancedPhysicalAbstractAlgorithm::AdvancedPhysicalAbstractAlgorithm ( const AdvancedPhysicalPipelineNodePtr handle,
const std::string &  jobID,
bool  isProbing,
bool  isOutput,
Handle< SetIdentifier source,
Handle< ComputePlan computePlan,
const LogicalPlanPtr logicalPlan,
const ConfigurationPtr conf 
)

Definition at line 21 of file AdvancedPhysicalAbstractAlgorithm.cc.

Member Function Documentation

DataStatistics AdvancedPhysicalAbstractAlgorithm::approximateResultSize ( const StatisticsPtr stats)
protectedvirtual

Approximates the size of the result of this algorithm. The default implementation simply returns the same size as the source set

Returns
the size of the sets

Definition at line 77 of file AdvancedPhysicalAbstractAlgorithm.cc.

+ Here is the caller graph for this function:

void AdvancedPhysicalAbstractAlgorithm::extractAtomicComputations ( )
protected

This method goes through each pipe in the pipeline and extracts all the atomic computations in each pipe and inserts them into the

See Also
pipeComputations list.

Definition at line 121 of file AdvancedPhysicalAbstractAlgorithm.cc.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void AdvancedPhysicalAbstractAlgorithm::extractHashSetsToProbe ( )
protected

This method goes through each pipe and checks if it is joining.

Definition at line 148 of file AdvancedPhysicalAbstractAlgorithm.cc.

+ Here is the caller graph for this function:

virtual PhysicalOptimizerResultPtr pdb::AdvancedPhysicalAbstractAlgorithm::generate ( int  nextStageID,
const StatisticsPtr stats 
)
pure virtual
PhysicalOptimizerResultPtr AdvancedPhysicalAbstractAlgorithm::generatePipelined ( int  nextStageID,
const StatisticsPtr stats,
std::vector< AdvancedPhysicalPipelineNodePtr > &  pipesToPipeline 
)
virtual

Generates the stages for pipelined operators

Parameters
nextStageID
pipesToPipeline
Returns

Definition at line 41 of file AdvancedPhysicalAbstractAlgorithm.cc.

+ Here is the call graph for this function:

void AdvancedPhysicalAbstractAlgorithm::includeHashComputation ( )
protected

A join has two sides in case that we generated a pipeline breaker for the probe set of the join (the one we don't use to build the hash map) we have to include it's hash atomic computation into the pipeComputations so we can do that join. (The reason why we have to do this is because TCAP is structured that way)

Definition at line 97 of file AdvancedPhysicalAbstractAlgorithm.cc.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void AdvancedPhysicalAbstractAlgorithm::updateConsumers ( const Handle< SetIdentifier > &  sink,
DataStatistics  approxSize,
const StatisticsPtr stats 
)
protected

Goes through every consumer and sets the source set of this consumer to be the sink of this algorithm

Parameters
sourceSetIdentifier- the set identifier of the new source
approxSize- the approximate size of the new source

Definition at line 55 of file AdvancedPhysicalAbstractAlgorithm.cc.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

Handle<ComputePlan> pdb::AdvancedPhysicalAbstractAlgorithm::computePlan
protected

The ComputePlan generated from input computations and the input TCAP string

Definition at line 138 of file AdvancedPhysicalAbstractAlgorithm.h.

ConfigurationPtr pdb::AdvancedPhysicalAbstractAlgorithm::conf
protected

A configuration object for this server node

Definition at line 143 of file AdvancedPhysicalAbstractAlgorithm.h.

bool pdb::AdvancedPhysicalAbstractAlgorithm::isOutput
protected

Is this an output pipeline

Definition at line 163 of file AdvancedPhysicalAbstractAlgorithm.h.

bool pdb::AdvancedPhysicalAbstractAlgorithm::isProbing
protected

If pipeline is probing a hash set this is true

Definition at line 158 of file AdvancedPhysicalAbstractAlgorithm.h.

std::string pdb::AdvancedPhysicalAbstractAlgorithm::jobID
protected

The id of the next stage

Definition at line 118 of file AdvancedPhysicalAbstractAlgorithm.h.

LogicalPlanPtr pdb::AdvancedPhysicalAbstractAlgorithm::logicalPlan
protected

Logical plan generated from the compute plan

Definition at line 133 of file AdvancedPhysicalAbstractAlgorithm.h.

std::list<AdvancedPhysicalPipelineNodePtr> pdb::AdvancedPhysicalAbstractAlgorithm::pipeline
protected

The handle to the node this algorithm is associated with

Definition at line 113 of file AdvancedPhysicalAbstractAlgorithm.h.

list<AtomicComputationPtr> pdb::AdvancedPhysicalAbstractAlgorithm::pipelineComputations
protected

Contains all the atomic computations that make-up this pipe

Definition at line 123 of file AdvancedPhysicalAbstractAlgorithm.h.

unordered_map<std::string, std::string> pdb::AdvancedPhysicalAbstractAlgorithm::probingHashSets
protected

All the hash sets we are probing in this algorithm

Definition at line 128 of file AdvancedPhysicalAbstractAlgorithm.h.

Handle<SetIdentifier> pdb::AdvancedPhysicalAbstractAlgorithm::sink
protected

The sink of this algorithm

Definition at line 148 of file AdvancedPhysicalAbstractAlgorithm.h.

Handle<SetIdentifier> pdb::AdvancedPhysicalAbstractAlgorithm::source
protected

Source set associated with this node.

Definition at line 153 of file AdvancedPhysicalAbstractAlgorithm.h.


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