Package org.apache.flink.optimizer.dag
Class WorksetIterationNode
- java.lang.Object
-
- org.apache.flink.optimizer.dag.OptimizerNode
-
- org.apache.flink.optimizer.dag.TwoInputNode
-
- org.apache.flink.optimizer.dag.WorksetIterationNode
-
- All Implemented Interfaces:
EstimateProvider,IterationNode,DumpableNode<OptimizerNode>,org.apache.flink.util.Visitable<OptimizerNode>
public class WorksetIterationNode extends TwoInputNode implements IterationNode
A node in the optimizer's program representation for a workset iteration.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWorksetIterationNode.SingleRootJoiner-
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, estimatedNumRecords, estimatedOutputSize, hereJoinedBranches, id, MAX_DYNAMIC_PATH_COST_WEIGHT, onDynamicPath, openBranches, uniqueFields
-
-
Constructor Summary
Constructors Constructor Description WorksetIterationNode(org.apache.flink.api.common.operators.base.DeltaIterationBase<?,?> iteration)Creates a new node with a single input for the optimizer plan.
-
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()OptimizerNodegetInitialSolutionSetPredecessorNode()OptimizerNodegetInitialWorksetPredecessorNode()org.apache.flink.api.common.operators.base.DeltaIterationBase<?,?>getIterationContract()OptimizerNodegetNextWorkset()StringgetOperatorName()Gets the name of this node, which is the name of the function/operator, or data source / data sink.protected List<OperatorDescriptorDual>getPossibleProperties()org.apache.flink.api.common.operators.SemanticPropertiesgetSemanticProperties()TwoInputNodegetSingleRootOfStepFunction()OptimizerNodegetSolutionSetDelta()org.apache.flink.api.common.operators.util.FieldListgetSolutionSetKeyFields()SolutionSetNodegetSolutionSetNode()WorksetNodegetWorksetNode()protected voidinstantiate(OperatorDescriptorDual operator, Channel solutionSetIn, Channel worksetIn, List<Set<? extends NamedChannel>> broadcastPlanChannels, List<PlanNode> target, CostEstimator estimator, RequestedGlobalProperties globPropsReqSolutionSet, RequestedGlobalProperties globPropsReqWorkset, RequestedLocalProperties locPropsReqSolutionSet, RequestedLocalProperties locPropsReqWorkset)protected voidreadStubAnnotations()Reads all stub annotations, i.e.voidsetNextPartialSolution(OptimizerNode solutionSetDelta, OptimizerNode nextWorkset, org.apache.flink.api.common.ExecutionMode executionMode)voidsetPartialSolution(SolutionSetNode solutionSetNode, WorksetNode worksetNode)-
Methods inherited from class org.apache.flink.optimizer.dag.TwoInputNode
accept, addLocalCandidates, getAlternativePlans, getFirstIncomingConnection, getFirstPredecessorNode, getIncomingConnections, getOperator, getSecondIncomingConnection, getSecondPredecessorNode, getSemanticPropertiesForGlobalPropertyFiltering, getSemanticPropertiesForLocalPropertyFiltering, placePipelineBreakersIfNecessary, 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.DeltaIterationBase<?,?> getIterationContract()
-
getSolutionSetNode
public SolutionSetNode getSolutionSetNode()
-
getWorksetNode
public WorksetNode getWorksetNode()
-
getNextWorkset
public OptimizerNode getNextWorkset()
-
getSolutionSetDelta
public OptimizerNode getSolutionSetDelta()
-
setPartialSolution
public void setPartialSolution(SolutionSetNode solutionSetNode, WorksetNode worksetNode)
-
setNextPartialSolution
public void setNextPartialSolution(OptimizerNode solutionSetDelta, OptimizerNode nextWorkset, org.apache.flink.api.common.ExecutionMode executionMode)
-
getCostWeight
public int getCostWeight()
- Overrides:
getCostWeightin classOptimizerNode
-
getSingleRootOfStepFunction
public TwoInputNode getSingleRootOfStepFunction()
-
getSolutionSetKeyFields
public org.apache.flink.api.common.operators.util.FieldList getSolutionSetKeyFields()
-
getInitialSolutionSetPredecessorNode
public OptimizerNode getInitialSolutionSetPredecessorNode()
-
getInitialWorksetPredecessorNode
public OptimizerNode getInitialWorksetPredecessorNode()
-
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 classTwoInputNode
-
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<OperatorDescriptorDual> getPossibleProperties()
- Specified by:
getPossiblePropertiesin classTwoInputNode
-
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 classTwoInputNode- Parameters:
estimator- TheCostEstimatorinstance to use for plan cost estimation.
-
clearInterestingProperties
public void clearInterestingProperties()
- Overrides:
clearInterestingPropertiesin classOptimizerNode
-
instantiate
protected void instantiate(OperatorDescriptorDual operator, Channel solutionSetIn, Channel worksetIn, List<Set<? extends NamedChannel>> broadcastPlanChannels, List<PlanNode> target, CostEstimator estimator, RequestedGlobalProperties globPropsReqSolutionSet, RequestedGlobalProperties globPropsReqWorkset, RequestedLocalProperties locPropsReqSolutionSet, RequestedLocalProperties locPropsReqWorkset)
- Overrides:
instantiatein classTwoInputNode
-
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
-
acceptForStepFunction
public void acceptForStepFunction(org.apache.flink.util.Visitor<OptimizerNode> visitor)
- Specified by:
acceptForStepFunctionin interfaceIterationNode
-
-