Package org.apache.flink.optimizer.dag
Class BulkIterationNode
- java.lang.Object
-
- org.apache.flink.optimizer.dag.OptimizerNode
-
- org.apache.flink.optimizer.dag.SingleInputNode
-
- org.apache.flink.optimizer.dag.BulkIterationNode
-
- All Implemented Interfaces:
EstimateProvider,IterationNode,DumpableNode<OptimizerNode>,org.apache.flink.util.Visitable<OptimizerNode>
public class BulkIterationNode extends SingleInputNode implements IterationNode
A node in the optimizer's program representation for a bulk iteration.
-
-
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.SingleInputNode
inConn, keys
-
Fields inherited from class org.apache.flink.optimizer.dag.OptimizerNode
cachedPlans, closedBranchingNodes, estimatedNumRecords, estimatedOutputSize, hereJoinedBranches, id, MAX_DYNAMIC_PATH_COST_WEIGHT, onDynamicPath, openBranches, uniqueFields
-
-
Constructor Summary
Constructors Constructor Description BulkIterationNode(org.apache.flink.api.common.operators.base.BulkIterationBase<?> iteration)Creates a new node for the bulk iteration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidacceptForStepFunction(org.apache.flink.util.Visitor<OptimizerNode> visitor)voidclearInterestingProperties()voidcomputeInterestingPropertiesForInputs(CostEstimator estimator)Tells the node to compute the interesting properties for its inputs.protected voidcomputeOperatorSpecificDefaultEstimates(DataStatistics statistics)voidcomputeUnclosedBranchStack()This method causes the node to compute the description of open branches in its sub-plan.intgetCostWeight()org.apache.flink.api.common.operators.base.BulkIterationBase<?>getIterationContract()OptimizerNodegetNextPartialSolution()Gets the nextPartialSolution from this BulkIterationNode.StringgetOperatorName()Gets the name of this node, which is the name of the function/operator, or data source / data sink.BulkPartialSolutionNodegetPartialSolution()Gets the partialSolution from this BulkIterationNode.protected List<OperatorDescriptorSingle>getPossibleProperties()org.apache.flink.api.common.operators.SemanticPropertiesgetSemanticProperties()OptimizerNodegetSingleRootOfStepFunction()protected voidinstantiateCandidate(OperatorDescriptorSingle dps, Channel in, List<Set<? extends NamedChannel>> broadcastPlanChannels, List<PlanNode> target, CostEstimator estimator, RequestedGlobalProperties globPropsReq, RequestedLocalProperties locPropsReq)protected voidreadStubAnnotations()Reads all stub annotations, i.e.voidsetNextPartialSolution(OptimizerNode nextPartialSolution, OptimizerNode terminationCriterion)Sets the nextPartialSolution for this BulkIterationNode.voidsetPartialSolution(BulkPartialSolutionNode partialSolution)Sets the partialSolution for this BulkIterationNode.-
Methods inherited from class org.apache.flink.optimizer.dag.SingleInputNode
accept, addLocalCandidates, getAlternativePlans, getIncomingConnection, getIncomingConnections, getOperator, getPredecessorNode, getSemanticPropertiesForGlobalPropertyFiltering, getSemanticPropertiesForLocalPropertyFiltering, setIncomingConnection, setInput
-
Methods inherited from class org.apache.flink.optimizer.dag.OptimizerNode
addBroadcastConnection, addClosedBranch, addClosedBranches, addOutgoingConnection, areBranchCompatible, computeOutputEstimates, computeUnclosedBranchStackForBroadcastInputs, computeUnionOfInterestingPropertiesFromSuccessors, getBranchesForParent, getBroadcastConnectionNames, getBroadcastConnections, getClosedBranchingNodes, getDumpableInputs, getEstimatedAvgWidthPerOutputRecord, getEstimatedNumRecords, getEstimatedOutputSize, getId, getInterestingProperties, getMaxDepth, getMinimalMemoryAcrossAllSubTasks, getOpenBranches, getOptimizerNode, getOutgoingConnections, getParallelism, getPlanNode, getPredecessors, getUniqueFields, hasUnclosedBranches, haveAllOutputConnectionInterestingProperties, identifyDynamicPath, initId, isBranching, isOnDynamicPath, markAllOutgoingConnectionsAsPipelineBreaking, mergeLists, prunePlanAlternatives, prunePlanAlternativesWithCommonBranching, readUniqueFieldsAnnotation, removeClosedBranches, setBroadcastInputs, setEstimatedNumRecords, setEstimatedOutputSize, setParallelism, toString
-
-
-
-
Method Detail
-
getIterationContract
public org.apache.flink.api.common.operators.base.BulkIterationBase<?> getIterationContract()
-
getPartialSolution
public BulkPartialSolutionNode getPartialSolution()
Gets the partialSolution from this BulkIterationNode.- Returns:
- The partialSolution.
-
setPartialSolution
public void setPartialSolution(BulkPartialSolutionNode partialSolution)
Sets the partialSolution for this BulkIterationNode.- Parameters:
partialSolution- The partialSolution to set.
-
getNextPartialSolution
public OptimizerNode getNextPartialSolution()
Gets the nextPartialSolution from this BulkIterationNode.- Returns:
- The nextPartialSolution.
-
setNextPartialSolution
public void setNextPartialSolution(OptimizerNode nextPartialSolution, OptimizerNode terminationCriterion)
Sets the nextPartialSolution for this BulkIterationNode.- Parameters:
nextPartialSolution- The nextPartialSolution to set.
-
getCostWeight
public int getCostWeight()
- Overrides:
getCostWeightin classOptimizerNode
-
getSingleRootOfStepFunction
public OptimizerNode getSingleRootOfStepFunction()
-
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.
-
getSemanticProperties
public org.apache.flink.api.common.operators.SemanticProperties getSemanticProperties()
- Overrides:
getSemanticPropertiesin classSingleInputNode
-
readStubAnnotations
protected void readStubAnnotations()
Description copied from class:OptimizerNodeReads all stub annotations, i.e. which fields remain constant, what cardinality bounds the functions have, which fields remain unique.- Overrides:
readStubAnnotationsin classOptimizerNode
-
computeOperatorSpecificDefaultEstimates
protected void computeOperatorSpecificDefaultEstimates(DataStatistics statistics)
- Specified by:
computeOperatorSpecificDefaultEstimatesin classOptimizerNode
-
getPossibleProperties
protected List<OperatorDescriptorSingle> getPossibleProperties()
- Specified by:
getPossiblePropertiesin classSingleInputNode
-
computeInterestingPropertiesForInputs
public void computeInterestingPropertiesForInputs(CostEstimator estimator)
Description copied from class:OptimizerNodeTells the node to compute the interesting properties for its inputs. The interesting properties for the node itself must have been computed before. The node must then see how many of interesting properties it preserves and add its own.- Overrides:
computeInterestingPropertiesForInputsin classSingleInputNode- Parameters:
estimator- TheCostEstimatorinstance to use for plan cost estimation.
-
clearInterestingProperties
public void clearInterestingProperties()
- Overrides:
clearInterestingPropertiesin classOptimizerNode
-
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 classSingleInputNode
-
instantiateCandidate
protected void instantiateCandidate(OperatorDescriptorSingle dps, Channel in, List<Set<? extends NamedChannel>> broadcastPlanChannels, List<PlanNode> target, CostEstimator estimator, RequestedGlobalProperties globPropsReq, RequestedLocalProperties locPropsReq)
- Overrides:
instantiateCandidatein classSingleInputNode
-
acceptForStepFunction
public void acceptForStepFunction(org.apache.flink.util.Visitor<OptimizerNode> visitor)
- Specified by:
acceptForStepFunctionin interfaceIterationNode
-
-