public class DataSourceNode extends OptimizerNode
OptimizerNode.UnclosedBranchDescriptorcachedPlans, closedBranchingNodes, costWeight, estimatedNumRecords, estimatedOutputSize, hereJoinedBranches, id, MAX_DYNAMIC_PATH_COST_WEIGHT, onDynamicPath, openBranches, remappedKeys, uniqueFields| Constructor and Description |
|---|
DataSourceNode(GenericDataSourceBase<?,?> pactContract)
Creates a new DataSourceNode for the given contract.
|
| 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) |
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.
|
List<PactConnection> |
getIncomingConnections()
This method needs to be overridden by subclasses to return the children.
|
String |
getName()
Gets the name of this node.
|
GenericDataSourceBase<?,?> |
getPactContract()
Gets the contract object for this data source node.
|
boolean |
isFieldConstant(int input,
int fieldNumber)
Checks whether a field is modified by the user code or whether it is kept unchanged.
|
void |
setDegreeOfParallelism(int degreeOfParallelism)
Sets the degree of parallelism for the contract represented by this optimizer node.
|
void |
setInput(Map<Operator<?>,OptimizerNode> contractToNode)
This function is for plan translation purposes.
|
addBroadcastConnection, addClosedBranch, addClosedBranches, addOutgoingConnection, areBranchCompatible, clearInterestingProperties, computeOutputEstimates, computeUnclosedBranchStackForBroadcastInputs, computeUnionOfInterestingPropertiesFromSuccessors, createUniqueFieldsForNode, getBranchesForParent, getBroadcastConnectionNames, getBroadcastConnections, getClosedBranchingNodes, getConstantKeySet, getCostWeight, getDegreeOfParallelism, getDumpableInputs, getEstimatedAvgWidthPerOutputRecord, getEstimatedNumRecords, getEstimatedOutputSize, getId, getInterestingProperties, getMaxDepth, getMinimalMemoryAcrossAllSubTasks, getOpenBranches, getOptimizerNode, getOutgoingConnections, getPlanNode, getPredecessors, getRemappedKeys, getUniqueFields, hasUnclosedBranches, haveAllOutputConnectionInterestingProperties, identifyDynamicPath, initId, isBranching, isOnDynamicPath, mergeLists, prunePlanAlternatives, prunePlanAlternativesWithCommonBranching, readStubAnnotations, readUniqueFieldsAnnotation, removeClosedBranches, setBroadcastInputs, setEstimatedNumRecords, setEstimatedOutputSize, toStringpublic DataSourceNode(GenericDataSourceBase<?,?> pactContract)
pactContract - The data source contract object.public GenericDataSourceBase<?,?> getPactContract()
getPactContract in class OptimizerNodepublic String getName()
OptimizerNodegetName in class OptimizerNodepublic void setDegreeOfParallelism(int degreeOfParallelism)
OptimizerNode-1, then the system will take
the default number of parallel instances.setDegreeOfParallelism in class OptimizerNodedegreeOfParallelism - The degree of parallelism to set.public List<PactConnection> getIncomingConnections()
OptimizerNodegetIncomingConnections 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 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.