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 <AbstractPhysicalNode.h>
Public Member Functions | |
AbstractPhysicalNode (string &jobId, const Handle< ComputePlan > &computePlan, LogicalPlanPtr &logicalPlan, ConfigurationPtr &conf) | |
virtual PhysicalOptimizerResultPtr | analyze (const StatisticsPtr &stats, int nextStageID)=0 |
virtual double | getCost (const StatisticsPtr &stats)=0 |
virtual bool | hasConsumers ()=0 |
virtual bool | isConsuming (Handle< SetIdentifier > &set)=0 |
virtual std::string | getNodeIdentifier ()=0 |
AbstractPhysicalNodePtr | getHandle () |
virtual void | removeConsumer (const AbstractPhysicalNodePtr &consumer) |
virtual void | addConsumer (const pdb::AbstractPhysicalNodePtr &consumer) |
AbstractPhysicalNodePtr | getConsumer (int idx) |
size_t | getNumConsumers () |
AbstractPhysicalNodePtr | getProducer (int idx) |
size_t | getNumProducers () |
template<typename T > | |
std::shared_ptr< T > | to () |
Protected Member Functions | |
Handle< SetIdentifier > | getSetIdentifierFromComputation (Handle< Computation > computation) |
Protected Attributes | |
std::string | jobId |
Handle< ComputePlan > | computePlan |
LogicalPlanPtr | logicalPlan |
ConfigurationPtr | conf |
std::list < AbstractPhysicalNodePtr > | consumers |
std::list < AbstractPhysicalNodeWeakPtr > | producers |
AbstractPhysicalNodeWeakPtr | handle |
All PhysicalNodes inherit from this class. Instances of this abstract class are used to analyze the TCAP graph and generate a physical plan out of it.
Definition at line 75 of file AbstractPhysicalNode.h.
pdb::AbstractPhysicalNode::AbstractPhysicalNode | ( | string & | jobId, |
const Handle< ComputePlan > & | computePlan, | ||
LogicalPlanPtr & | logicalPlan, | ||
ConfigurationPtr & | conf | ||
) |
Definition at line 26 of file AbstractPhysicalNode.cc.
|
inlinevirtual |
Adds a consumer to the node
consumer | the consumer |
Reimplemented in pdb::SimplePhysicalNode.
Definition at line 135 of file AbstractPhysicalNode.h.
|
pure virtual |
Performs the actual analysis of the TCAP and returns a partial physical plan in the case it succeeds
Implemented in pdb::AdvancedPhysicalAbstractPipe, and pdb::SimplePhysicalNode.
pdb::AbstractPhysicalNodePtr pdb::AbstractPhysicalNode::getConsumer | ( | int | idx | ) |
Returns the idx-th consumer of this node
idx | - the index |
Definition at line 103 of file AbstractPhysicalNode.cc.
|
pure virtual |
Given the source set for this node and the statistics this method returns a cost based on a heuristic
source | - the set identifier of the source |
stats | - the statistics about the sets |
Implemented in pdb::AdvancedPhysicalAbstractPipe, and pdb::SimplePhysicalNode.
AbstractPhysicalNodePtr pdb::AbstractPhysicalNode::getHandle | ( | ) |
Returns a shared pointer handle to this node
Definition at line 93 of file AbstractPhysicalNode.cc.
|
pure virtual |
Returns a string that uniquely identifies this node
Implemented in pdb::AdvancedPhysicalAbstractPipe, and pdb::SimplePhysicalNode.
size_t pdb::AbstractPhysicalNode::getNumConsumers | ( | ) |
Returns the number of consumers this pipe has
Definition at line 113 of file AbstractPhysicalNode.cc.
size_t pdb::AbstractPhysicalNode::getNumProducers | ( | ) |
Returns the number of producers this pipe has
Definition at line 127 of file AbstractPhysicalNode.cc.
pdb::AbstractPhysicalNodePtr pdb::AbstractPhysicalNode::getProducer | ( | int | idx | ) |
Returns the idx-th producer of this node
idx | - the index |
Definition at line 117 of file AbstractPhysicalNode.cc.
|
protected |
Extracts a set identifier from a computation
computation | the computation |
Definition at line 35 of file AbstractPhysicalNode.cc.
|
pure virtual |
Returns true if this node still has consumers
Implemented in pdb::AdvancedPhysicalAbstractPipe, and pdb::SimplePhysicalNode.
|
pure virtual |
Returns true if the set provided is consumed by some later stage in the planning
set | - the set identifier of the set we want to check |
Implemented in pdb::AdvancedPhysicalAbstractPipe, and pdb::SimplePhysicalNode.
|
inlinevirtual |
Removes a consumer of this node
consumer | the consumer we want to remove |
Definition at line 126 of file AbstractPhysicalNode.h.
|
inline |
This method is used to cast the handle to cast the abstract node to different kinds of node based on the template parameter T
T | - the tipe we want to cast the handle into |
Definition at line 174 of file AbstractPhysicalNode.h.
|
protected |
The ComputePlan generated from input computations and the input TCAP string
Definition at line 189 of file AbstractPhysicalNode.h.
|
protected |
A configuration object for this server node
Definition at line 199 of file AbstractPhysicalNode.h.
|
protected |
A list of consumers of this node
Definition at line 204 of file AbstractPhysicalNode.h.
|
protected |
A shared pointer to an instance of this node
Definition at line 214 of file AbstractPhysicalNode.h.
|
protected |
The jobId for this query (can be any string that is can be a database name)
Definition at line 184 of file AbstractPhysicalNode.h.
|
protected |
Logical plan generated from the compute plan
Definition at line 194 of file AbstractPhysicalNode.h.
|
protected |
A list of producers of this node
Definition at line 209 of file AbstractPhysicalNode.h.