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 <SimplePhysicalNode.h>
Protected Member Functions | |
virtual PhysicalOptimizerResultPtr | analyzeSingleConsumer (TupleSetJobStageBuilderPtr &tupleStageBuilder, SimplePhysicalNodePtr &prevNode, const StatisticsPtr &stats, int nextStageID) |
virtual PhysicalOptimizerResultPtr | analyzeOutput (TupleSetJobStageBuilderPtr &tupleStageBuilder, SimplePhysicalNodePtr &prevNode, const StatisticsPtr &stats, int nextStageID) |
virtual PhysicalOptimizerResultPtr | analyzeMultipleConsumers (TupleSetJobStageBuilderPtr &ptr, SimplePhysicalNodePtr &prevNode, const StatisticsPtr &stats, int nextStageID) |
std::string | getNodeIdentifier () override |
double | getCost (Handle< SetIdentifier > source, const StatisticsPtr &stats) |
const Handle< SetIdentifier > & | getSourceSetIdentifier () const |
Protected Member Functions inherited from pdb::AbstractPhysicalNode | |
Handle< SetIdentifier > | getSetIdentifierFromComputation (Handle< Computation > computation) |
Protected Attributes | |
std::list< SimplePhysicalNodePtr > | activeConsumers |
Handle< SetIdentifier > | sourceSetIdentifier |
AtomicComputationPtr | node |
Protected Attributes inherited from pdb::AbstractPhysicalNode | |
std::string | jobId |
Handle< ComputePlan > | computePlan |
LogicalPlanPtr | logicalPlan |
ConfigurationPtr | conf |
std::list < AbstractPhysicalNodePtr > | consumers |
std::list < AbstractPhysicalNodeWeakPtr > | producers |
AbstractPhysicalNodeWeakPtr | handle |
Definition at line 33 of file SimplePhysicalNode.h.
pdb::SimplePhysicalNode::SimplePhysicalNode | ( | string | jobId, |
AtomicComputationPtr | node, | ||
const Handle< ComputePlan > & | computePlan, | ||
LogicalPlanPtr | logicalPlan, | ||
ConfigurationPtr | conf | ||
) |
|
overridevirtual |
Adds a consumer to this node This method calls the base method but also adds the consumer to the list of
consumer |
Reimplemented from pdb::AbstractPhysicalNode.
Definition at line 116 of file SimplePhysicalNode.cc.
|
overridevirtual |
This method starts the analysis for the simple physical optimizer. What it does is it sets up a TupleStageBuilder and then calls recursively the other analyze method
Implements pdb::AbstractPhysicalNode.
Definition at line 43 of file SimplePhysicalNode.cc.
PhysicalOptimizerResultPtr pdb::SimplePhysicalNode::analyze | ( | TupleSetJobStageBuilderPtr & | shared_ptr, |
SimplePhysicalNodePtr & | prevNode, | ||
const StatisticsPtr & | stats, | ||
int | nextStageID | ||
) |
Depending on the number of active consumers this node has it either :
analyzeOutput - in the case this node does not have any consumers analyzeSingleConsumer - in the case there is just one consumer analyzeMultipleConsumers - in the case that this node has multiple consumers
shared_ptr |
Definition at line 86 of file SimplePhysicalNode.cc.
|
protectedvirtual |
This method is called if we have multiple consumers thus this node needs to materialized What it does it check whether we already need to materialize this node if not, it makes it materializable the it just creates a job stage
tupleStageBuilder | - the builder for the tuple set job stage, that contains all the computations in our pipeline so far. |
prevNode | - the previous node we are coming from to analyze this node |
stats | - the statistics about the sets that are in the catalog |
nextStageID | - the id of the next stage for this job |
Reimplemented in pdb::SimplePhysicalAggregationNode, and pdb::SimplePhysicalPartitionNode.
Definition at line 204 of file SimplePhysicalNode.cc.
|
protectedvirtual |
This method is called if we do not have any consumers thus this is an output node What it does is, it just creates a job stage and returns a result with success
tupleStageBuilder | - the builder for the tuple set job stage, that contains all the computations in our pipeline so far. |
prevNode | - the previous node we are coming from to analyze this node |
stats | - the statistics about the sets that are in the catalog |
nextStageID | - the id of the next stage for this job |
Reimplemented in pdb::SimplePhysicalAggregationNode, pdb::SimplePhysicalPartitionNode, and pdb::SimplePhysicalJoinNode.
Definition at line 172 of file SimplePhysicalNode.cc.
|
protectedvirtual |
This method is called in the case that we have just one consumer of this node What it does is, it just adds AtomicComputation associated with this node to the pipline we are building
tupleStageBuilder | - the builder for the tuple set job stage, that contains all the computations in our pipeline so far. |
prevNode | - the previous node we are coming from to analyze this node |
stats | - the statistics about the sets that are in the catalog |
nextStageID | - the id of the next stage for this job |
Reimplemented in pdb::SimplePhysicalJoinNode, pdb::SimplePhysicalAggregationNode, and pdb::SimplePhysicalPartitionNode.
Definition at line 143 of file SimplePhysicalNode.cc.
|
overridevirtual |
Return the cost by calling the
stats | - the statistics about the sets |
Implements pdb::AbstractPhysicalNode.
Definition at line 264 of file SimplePhysicalNode.cc.
|
protected |
This method calculates the cost of the provided source. The cost is calculated by the formula : cost = number_of_bytes / 1000000
source | |
stats |
Definition at line 124 of file SimplePhysicalNode.cc.
const AtomicComputationPtr & pdb::SimplePhysicalNode::getNode | ( | ) | const |
Returns the AtomicComputation associated with this AbstractPhysicalNode
Definition at line 104 of file SimplePhysicalNode.cc.
|
overrideprotectedvirtual |
Returns the identifier of this node in this case in the form of <databaseName>:<setName>
Implements pdb::AbstractPhysicalNode.
Definition at line 270 of file SimplePhysicalNode.cc.
SimplePhysicalNodePtr pdb::SimplePhysicalNode::getSimpleNodeHandle | ( | ) |
Returns the shared_pointer to this node
Definition at line 278 of file SimplePhysicalNode.cc.
|
protected |
This method returns the set identifier of the source if this node is a source, returns null otherwise
Definition at line 274 of file SimplePhysicalNode.cc.
|
overridevirtual |
Returns true if this node has any unprocessed consumers, false otherwise
Implements pdb::AbstractPhysicalNode.
Definition at line 108 of file SimplePhysicalNode.cc.
|
overridevirtual |
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 |
Implements pdb::AbstractPhysicalNode.
Definition at line 112 of file SimplePhysicalNode.cc.
|
protected |
A list of consumers of this node
Definition at line 179 of file SimplePhysicalNode.h.
|
protected |
The AtomicComputation associated with this node
Definition at line 189 of file SimplePhysicalNode.h.
|
protected |
Source set associated with this node.
Definition at line 184 of file SimplePhysicalNode.h.