Package org.apache.flink.optimizer.dag
Class SinkJoiner
- java.lang.Object
-
- org.apache.flink.optimizer.dag.OptimizerNode
-
- org.apache.flink.optimizer.dag.TwoInputNode
-
- org.apache.flink.optimizer.dag.SinkJoiner
-
- All Implemented Interfaces:
EstimateProvider,DumpableNode<OptimizerNode>,org.apache.flink.util.Visitable<OptimizerNode>
public class SinkJoiner extends TwoInputNode
This class represents a utility node that is not part of the actual plan. It is used for plans with multiple data sinks to transform it into a plan with a single root node. That way, the code that makes sure no costs are double-counted and that candidate selection works correctly with nodes that have multiple outputs is transparently reused.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.flink.optimizer.dag.OptimizerNode
OptimizerNode.UnclosedBranchDescriptor
-
-
Field Summary
-
Fields inherited from class org.apache.flink.optimizer.dag.TwoInputNode
input1, input2, keys1, keys2
-
Fields inherited from class org.apache.flink.optimizer.dag.OptimizerNode
cachedPlans, closedBranchingNodes, costWeight, estimatedNumRecords, estimatedOutputSize, hereJoinedBranches, id, MAX_DYNAMIC_PATH_COST_WEIGHT, onDynamicPath, openBranches, uniqueFields
-
-
Constructor Summary
Constructors Constructor Description SinkJoiner(OptimizerNode input1, OptimizerNode input2)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcomputeOperatorSpecificDefaultEstimates(DataStatistics statistics)voidcomputeOutputEstimates(DataStatistics statistics)Causes this node to compute its output estimates (such as number of rows, size in bytes) based on the inputs and the compiler hints.voidcomputeUnclosedBranchStack()This method causes the node to compute the description of open branches in its sub-plan.StringgetOperatorName()Gets the name of this node, which is the name of the function/operator, or data source / data sink.List<DagConnection>getOutgoingConnections()The list of outgoing connections from this node to succeeding tasks.protected List<OperatorDescriptorDual>getPossibleProperties()-
Methods inherited from class org.apache.flink.optimizer.dag.TwoInputNode
accept, addLocalCandidates, computeInterestingPropertiesForInputs, getAlternativePlans, getFirstIncomingConnection, getFirstPredecessorNode, getIncomingConnections, getOperator, getSecondIncomingConnection, getSecondPredecessorNode, getSemanticProperties, getSemanticPropertiesForGlobalPropertyFiltering, getSemanticPropertiesForLocalPropertyFiltering, instantiate, placePipelineBreakersIfNecessary, setInput
-
Methods inherited from class org.apache.flink.optimizer.dag.OptimizerNode
addBroadcastConnection, addClosedBranch, addClosedBranches, addOutgoingConnection, areBranchCompatible, clearInterestingProperties, computeUnclosedBranchStackForBroadcastInputs, computeUnionOfInterestingPropertiesFromSuccessors, getBranchesForParent, getBroadcastConnectionNames, getBroadcastConnections, getClosedBranchingNodes, getCostWeight, getDumpableInputs, getEstimatedAvgWidthPerOutputRecord, getEstimatedNumRecords, getEstimatedOutputSize, getId, getInterestingProperties, getMaxDepth, getMinimalMemoryAcrossAllSubTasks, getOpenBranches, getOptimizerNode, getParallelism, getPlanNode, getPredecessors, getUniqueFields, hasUnclosedBranches, haveAllOutputConnectionInterestingProperties, identifyDynamicPath, initId, isBranching, isOnDynamicPath, markAllOutgoingConnectionsAsPipelineBreaking, mergeLists, prunePlanAlternatives, prunePlanAlternativesWithCommonBranching, readStubAnnotations, readUniqueFieldsAnnotation, removeClosedBranches, setBroadcastInputs, setEstimatedNumRecords, setEstimatedOutputSize, setParallelism, toString
-
-
-
-
Constructor Detail
-
SinkJoiner
public SinkJoiner(OptimizerNode input1, OptimizerNode input2)
-
-
Method Detail
-
getOperatorName
public String getOperatorName()
Description copied from class:OptimizerNodeGets the name of this node, which is the name of the function/operator, or data source / data sink.- Specified by:
getOperatorNamein classOptimizerNode- Returns:
- The node name.
-
getOutgoingConnections
public List<DagConnection> getOutgoingConnections()
Description copied from class:OptimizerNodeThe list of outgoing connections from this node to succeeding tasks.- Overrides:
getOutgoingConnectionsin classOptimizerNode- Returns:
- The list of outgoing connections.
-
computeUnclosedBranchStack
public void computeUnclosedBranchStack()
Description copied from class:OptimizerNodeThis method causes the node to compute the description of open branches in its sub-plan. An open branch describes, that a (transitive) child node had multiple outputs, which have not all been re-joined in the sub-plan. This method needs to set theopenBranchesfield to a stack of unclosed branches, the latest one top. A branch is considered closed, if some later node sees all of the branching node's outputs, no matter if there have been more branches to different paths in the meantime.- Overrides:
computeUnclosedBranchStackin classTwoInputNode
-
getPossibleProperties
protected List<OperatorDescriptorDual> getPossibleProperties()
- Specified by:
getPossiblePropertiesin classTwoInputNode
-
computeOutputEstimates
public void computeOutputEstimates(DataStatistics statistics)
Description copied from class:OptimizerNodeCauses this node to compute its output estimates (such as number of rows, size in bytes) based on the inputs and the compiler hints. The compiler hints are instantiated with conservative default values which are used if no other values are provided. Nodes may access the statistics to determine relevant information.- Overrides:
computeOutputEstimatesin classOptimizerNode- Parameters:
statistics- The statistics object which may be accessed to get statistical information. The parameter may be null, if no statistics are available.
-
computeOperatorSpecificDefaultEstimates
protected void computeOperatorSpecificDefaultEstimates(DataStatistics statistics)
- Specified by:
computeOperatorSpecificDefaultEstimatesin classOptimizerNode
-
-