public abstract class PlanNode extends Object implements Visitable<PlanNode>, DumpableNode<PlanNode>
Because we currently deal only with plans where the operator order is fixed, many properties
are equal among candidates and are determined prior to the enumeration (such as for example
constant/dynamic path membership). Hence, many methods will delegate to the OptimizerNode
that represents the node this candidate was created for.
Modifier and Type | Class and Description |
---|---|
static class |
PlanNode.FeedbackPropertiesMeetRequirementsReport |
static class |
PlanNode.SourceAndDamReport |
Modifier and Type | Field and Description |
---|---|
protected Map<OptimizerNode,PlanNode> |
branchPlan |
protected Costs |
cumulativeCosts |
protected GlobalProperties |
globalProps |
protected LocalProperties |
localProps |
protected Costs |
nodeCosts |
protected List<Channel> |
outChannels |
protected OptimizerNode |
template |
Constructor and Description |
---|
PlanNode(OptimizerNode template,
String nodeName,
DriverStrategy strategy) |
Modifier and Type | Method and Description |
---|---|
void |
addOutgoingChannel(Channel channel)
Adds a channel to a successor node to this node.
|
PlanNode.FeedbackPropertiesMeetRequirementsReport |
checkPartialSolutionPropertiesMet(PlanNode partialSolution,
GlobalProperties feedbackGlobal,
LocalProperties feedbackLocal) |
Map<OptimizerNode,PlanNode> |
getBranchPlan() |
List<NamedChannel> |
getBroadcastInputs()
Gets a list of all broadcast inputs attached to this node.
|
PlanNode |
getCandidateAtBranchPoint(OptimizerNode branchPoint) |
int |
getCostWeight() |
Costs |
getCumulativeCosts()
Gets the cumulative costs of this nose.
|
Costs |
getCumulativeCostsShare() |
DriverStrategy |
getDriverStrategy()
Gets the driver strategy from this node.
|
Iterable<DumpableConnection<PlanNode>> |
getDumpableInputs() |
GlobalProperties |
getGlobalProperties()
Gets the global properties from this PlanNode.
|
long |
getGuaranteedAvailableMemory() |
abstract Iterable<Channel> |
getInputs() |
LocalProperties |
getLocalProperties()
Gets the local properties from this PlanNode.
|
int |
getMemoryConsumerWeight() |
ResourceSpec |
getMinResources() |
Costs |
getNodeCosts()
Gets the costs incurred by this node.
|
String |
getNodeName()
Gets the name of the plan node.
|
OptimizerNode |
getOptimizerNode() |
OptimizerNode |
getOriginalOptimizerNode()
Gets the node from the optimizer DAG for which this plan candidate node was created.
|
List<Channel> |
getOutgoingChannels()
Gets a list of all outgoing channels leading to successors.
|
int |
getParallelism() |
PlanNode |
getPlanNode() |
abstract Iterable<PlanNode> |
getPredecessors()
Gets an iterator over the predecessors.
|
ResourceSpec |
getPreferredResources() |
Operator<?> |
getProgramOperator()
Gets the program operator that this node represents in the plan.
|
double |
getRelativeMemoryPerSubTask()
Gets the memory dedicated to each sub-task for this node.
|
abstract PlanNode.SourceAndDamReport |
hasDamOnPathDownTo(PlanNode source)
Checks whether this node has a dam on the way down to the given source node.
|
void |
initProperties(GlobalProperties globals,
LocalProperties locals) |
boolean |
isOnDynamicPath() |
boolean |
isPruneMarkerSet()
Checks whether the pruning marker was set.
|
protected void |
mergeBranchPlanMaps(Map<OptimizerNode,PlanNode> branchPlan1,
Map<OptimizerNode,PlanNode> branchPlan2) |
protected void |
mergeBranchPlanMaps(PlanNode pred1,
PlanNode pred2) |
void |
setBroadcastInputs(List<NamedChannel> broadcastInputs)
Sets a list of all broadcast inputs attached to this node.
|
void |
setCosts(Costs nodeCosts)
Sets the basic cost for this node to the given value, and sets the cumulative costs to those
costs plus the cost shares of all inputs (regular and broadcast).
|
void |
setDriverStrategy(DriverStrategy newDriverStrategy)
Sets the driver strategy for this node.
|
void |
setParallelism(int parallelism) |
void |
setPruningMarker()
Sets the pruning marker to true.
|
void |
setRelativeMemoryPerSubtask(double relativeMemoryPerSubtask)
Sets the memory dedicated to each task for this node.
|
String |
toString() |
void |
updatePropertiesWithUniqueSets(Set<FieldSet> uniqueFieldCombinations) |
protected final OptimizerNode template
protected LocalProperties localProps
protected GlobalProperties globalProps
protected Map<OptimizerNode,PlanNode> branchPlan
protected Costs nodeCosts
protected Costs cumulativeCosts
public PlanNode(OptimizerNode template, String nodeName, DriverStrategy strategy)
protected void mergeBranchPlanMaps(Map<OptimizerNode,PlanNode> branchPlan1, Map<OptimizerNode,PlanNode> branchPlan2)
public OptimizerNode getOriginalOptimizerNode()
public Operator<?> getProgramOperator()
public String getNodeName()
public int getMemoryConsumerWeight()
public double getRelativeMemoryPerSubTask()
public void setRelativeMemoryPerSubtask(double relativeMemoryPerSubtask)
relativeMemoryPerSubtask
- The relative memory per sub-taskpublic DriverStrategy getDriverStrategy()
public void setDriverStrategy(DriverStrategy newDriverStrategy)
newDriverStrategy
- The driver strategy.public void initProperties(GlobalProperties globals, LocalProperties locals)
public LocalProperties getLocalProperties()
public GlobalProperties getGlobalProperties()
public Costs getNodeCosts()
public Costs getCumulativeCosts()
public Costs getCumulativeCostsShare()
public void setCosts(Costs nodeCosts)
nodeCosts
- The already knows costs for this node (this cost a produces by a concrete
OptimizerNode
subclass.public void setParallelism(int parallelism)
public int getParallelism()
public ResourceSpec getMinResources()
public ResourceSpec getPreferredResources()
public long getGuaranteedAvailableMemory()
public Map<OptimizerNode,PlanNode> getBranchPlan()
public abstract Iterable<PlanNode> getPredecessors()
DumpableNode
getPredecessors
in interface DumpableNode<PlanNode>
public void setBroadcastInputs(List<NamedChannel> broadcastInputs)
public List<NamedChannel> getBroadcastInputs()
public void addOutgoingChannel(Channel channel)
channel
- The channel to the successor.public List<Channel> getOutgoingChannels()
public void updatePropertiesWithUniqueSets(Set<FieldSet> uniqueFieldCombinations)
public PlanNode getCandidateAtBranchPoint(OptimizerNode branchPoint)
public void setPruningMarker()
public boolean isPruneMarkerSet()
public boolean isOnDynamicPath()
public int getCostWeight()
public abstract PlanNode.SourceAndDamReport hasDamOnPathDownTo(PlanNode source)
source
- The node on the path to which the dam is sought.public PlanNode.FeedbackPropertiesMeetRequirementsReport checkPartialSolutionPropertiesMet(PlanNode partialSolution, GlobalProperties feedbackGlobal, LocalProperties feedbackLocal)
public OptimizerNode getOptimizerNode()
getOptimizerNode
in interface DumpableNode<PlanNode>
public PlanNode getPlanNode()
getPlanNode
in interface DumpableNode<PlanNode>
public Iterable<DumpableConnection<PlanNode>> getDumpableInputs()
getDumpableInputs
in interface DumpableNode<PlanNode>
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.