public class DataSinkNode extends OptimizerNode
OptimizerNode.UnclosedBranchDescriptor| Modifier and Type | Field and Description |
|---|---|
protected PactConnection |
input |
cachedPlans, closedBranchingNodes, costWeight, estimatedNumRecords, estimatedOutputSize, hereJoinedBranches, id, MAX_DYNAMIC_PATH_COST_WEIGHT, onDynamicPath, openBranches, remappedKeys, uniqueFields| Constructor and Description |
|---|
DataSinkNode(GenericDataSinkBase<?> sink)
Creates a new DataSinkNode for the given sink operator.
|
| Modifier and Type | Method and Description |
|---|---|
void |
accept(Visitor<OptimizerNode> visitor)
This method implements the visit of a depth-first graph traversing visitor.
|
void |
computeInterestingPropertiesForInputs(CostEstimator estimator)
Tells the node to compute the interesting properties for its inputs.
|
protected void |
computeOperatorSpecificDefaultEstimates(DataStatistics statistics)
Computes the estimated outputs for the data sink.
|
void |
computeUnclosedBranchStack()
This method causes the node to compute the description of open branches in its sub-plan.
|
List<PlanNode> |
getAlternativePlans(CostEstimator estimator)
Computes the plan alternatives for this node, an implicitly for all nodes that are children of
this node.
|
protected List<OptimizerNode.UnclosedBranchDescriptor> |
getBranchesForParent(PactConnection parent) |
List<PactConnection> |
getIncomingConnections()
This method needs to be overridden by subclasses to return the children.
|
PactConnection |
getInputConnection()
Gets the input of the sink.
|
String |
getName()
Gets the name of this node.
|
List<PactConnection> |
getOutgoingConnections()
The list of outgoing connections from this node to succeeding tasks.
|
GenericDataSinkBase<?> |
getPactContract()
Gets the contract object for this data source node.
|
OptimizerNode |
getPredecessorNode() |
boolean |
isFieldConstant(int input,
int fieldNumber)
Checks whether a field is modified by the user code or whether it is kept unchanged.
|
void |
setInput(Map<Operator<?>,OptimizerNode> contractToNode)
This function is for plan translation purposes.
|
addBroadcastConnection, addClosedBranch, addClosedBranches, addOutgoingConnection, areBranchCompatible, clearInterestingProperties, computeOutputEstimates, computeUnclosedBranchStackForBroadcastInputs, computeUnionOfInterestingPropertiesFromSuccessors, createUniqueFieldsForNode, getBroadcastConnectionNames, getBroadcastConnections, getClosedBranchingNodes, getConstantKeySet, getCostWeight, getDegreeOfParallelism, getDumpableInputs, getEstimatedAvgWidthPerOutputRecord, getEstimatedNumRecords, getEstimatedOutputSize, getId, getInterestingProperties, getMaxDepth, getMinimalMemoryAcrossAllSubTasks, getOpenBranches, getOptimizerNode, getPlanNode, getPredecessors, getRemappedKeys, getUniqueFields, hasUnclosedBranches, haveAllOutputConnectionInterestingProperties, identifyDynamicPath, initId, isBranching, isOnDynamicPath, mergeLists, prunePlanAlternatives, prunePlanAlternativesWithCommonBranching, readStubAnnotations, readUniqueFieldsAnnotation, removeClosedBranches, setBroadcastInputs, setDegreeOfParallelism, setEstimatedNumRecords, setEstimatedOutputSize, toStringprotected PactConnection input
public DataSinkNode(GenericDataSinkBase<?> sink)
sink - The data sink contract object.public PactConnection getInputConnection()
public OptimizerNode getPredecessorNode()
public GenericDataSinkBase<?> getPactContract()
getPactContract in class OptimizerNodepublic String getName()
OptimizerNodegetName in class OptimizerNodepublic List<PactConnection> getIncomingConnections()
OptimizerNodegetIncomingConnections in class OptimizerNodepublic List<PactConnection> getOutgoingConnections()
OptimizerNodegetOutgoingConnections in class OptimizerNodepublic void setInput(Map<Operator<?>,OptimizerNode> contractToNode)
OptimizerNodeIn addition, the nodes must set the shipping strategy of the connection, if a suitable optimizer hint is found.
setInput in class OptimizerNodecontractToNode - The map to translate the contracts to their corresponding optimizer nodes.protected void computeOperatorSpecificDefaultEstimates(DataStatistics statistics)
computeOperatorSpecificDefaultEstimates in class OptimizerNodepublic void computeInterestingPropertiesForInputs(CostEstimator estimator)
OptimizerNodecomputeInterestingPropertiesForInputs in class OptimizerNodeestimator - The CostEstimator instance to use for plan cost estimation.public void computeUnclosedBranchStack()
OptimizerNodeopenBranches field 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.computeUnclosedBranchStack in class OptimizerNodeprotected List<OptimizerNode.UnclosedBranchDescriptor> getBranchesForParent(PactConnection parent)
getBranchesForParent in class OptimizerNodepublic List<PlanNode> getAlternativePlans(CostEstimator estimator)
OptimizerNodegetAlternatives() on its children
to get their plan alternatives, and build its own alternatives on top of those.getAlternativePlans in class OptimizerNodeestimator - The cost estimator used to estimate the costs of each plan alternative.public boolean isFieldConstant(int input,
int fieldNumber)
OptimizerNodeisFieldConstant in class OptimizerNodeinput - The input number.fieldNumber - The position of the field.public void accept(Visitor<OptimizerNode> visitor)
OptimizerNodepreVisit() method, then hand the visitor to their children, and finally call
the postVisit() method.accept in interface Visitable<OptimizerNode>accept in class OptimizerNodevisitor - The graph traversing visitor.Visitable.accept(org.apache.flink.util.Visitor)Copyright © 2014 The Apache Software Foundation. All rights reserved.