Package org.apache.flink.optimizer.plan
Class SingleInputPlanNode
- java.lang.Object
-
- org.apache.flink.optimizer.plan.PlanNode
-
- org.apache.flink.optimizer.plan.SingleInputPlanNode
-
- All Implemented Interfaces:
DumpableNode<PlanNode>,org.apache.flink.util.Visitable<PlanNode>
- Direct Known Subclasses:
BulkIterationPlanNode,SinkPlanNode
public class SingleInputPlanNode extends PlanNode
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.flink.optimizer.plan.PlanNode
PlanNode.FeedbackPropertiesMeetRequirementsReport, PlanNode.SourceAndDamReport
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.flink.api.common.operators.util.FieldList[]driverKeysprotected boolean[][]driverSortOrdersprotected ChannelinputObjectpostPassHelper-
Fields inherited from class org.apache.flink.optimizer.plan.PlanNode
branchPlan, cumulativeCosts, globalProps, localProps, nodeCosts, outChannels, template
-
-
Constructor Summary
Constructors Constructor Description SingleInputPlanNode(OptimizerNode template, String nodeName, Channel input, org.apache.flink.runtime.operators.DriverStrategy driverStrategy)SingleInputPlanNode(OptimizerNode template, String nodeName, Channel input, org.apache.flink.runtime.operators.DriverStrategy driverStrategy, org.apache.flink.api.common.operators.util.FieldList driverKeyFields)SingleInputPlanNode(OptimizerNode template, String nodeName, Channel input, org.apache.flink.runtime.operators.DriverStrategy driverStrategy, org.apache.flink.api.common.operators.util.FieldList driverKeyFields, boolean[] driverSortOrders)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(org.apache.flink.util.Visitor<PlanNode> visitor)org.apache.flink.api.common.typeutils.TypeComparatorFactory<?>getComparator(int id)Gets the specified comparator from this PlanNode.ChannelgetInput()Gets the input channel to this node.Iterable<Channel>getInputs()org.apache.flink.api.common.operators.util.FieldListgetKeys(int id)Gets the key field indexes for the specified driver comparator.PlanNodegetPredecessor()Gets the predecessor of this node, i.e.Iterable<PlanNode>getPredecessors()Gets an iterator over the predecessors.SingleInputNodegetSingleInputNode()boolean[]getSortOrders(int id)Gets the sort order for the specified driver comparator.protected static boolean[]getTrueArray(int length)PlanNode.SourceAndDamReporthasDamOnPathDownTo(PlanNode source)Checks whether this node has a dam on the way down to the given source node.voidsetComparator(org.apache.flink.api.common.typeutils.TypeComparatorFactory<?> comparator, int id)Sets the specified comparator for this PlanNode.voidsetDriverKeyInfo(org.apache.flink.api.common.operators.util.FieldList keys, boolean[] sortOrder, int id)Sets the key field information for the specified driver comparator.voidsetDriverKeyInfo(org.apache.flink.api.common.operators.util.FieldList keys, int id)Sets the key field indexes for the specified driver comparator.-
Methods inherited from class org.apache.flink.optimizer.plan.PlanNode
addOutgoingChannel, checkPartialSolutionPropertiesMet, getBranchPlan, getBroadcastInputs, getCandidateAtBranchPoint, getCostWeight, getCumulativeCosts, getCumulativeCostsShare, getDriverStrategy, getDumpableInputs, getGlobalProperties, getGuaranteedAvailableMemory, getLocalProperties, getMemoryConsumerWeight, getMinResources, getNodeCosts, getNodeName, getOptimizerNode, getOriginalOptimizerNode, getOutgoingChannels, getParallelism, getPlanNode, getPreferredResources, getProgramOperator, getRelativeMemoryPerSubTask, initProperties, isOnDynamicPath, isPruneMarkerSet, mergeBranchPlanMaps, mergeBranchPlanMaps, setBroadcastInputs, setCosts, setDriverStrategy, setParallelism, setPruningMarker, setRelativeMemoryPerSubtask, toString, updatePropertiesWithUniqueSets
-
-
-
-
Constructor Detail
-
SingleInputPlanNode
public SingleInputPlanNode(OptimizerNode template, String nodeName, Channel input, org.apache.flink.runtime.operators.DriverStrategy driverStrategy)
-
SingleInputPlanNode
public SingleInputPlanNode(OptimizerNode template, String nodeName, Channel input, org.apache.flink.runtime.operators.DriverStrategy driverStrategy, org.apache.flink.api.common.operators.util.FieldList driverKeyFields)
-
SingleInputPlanNode
public SingleInputPlanNode(OptimizerNode template, String nodeName, Channel input, org.apache.flink.runtime.operators.DriverStrategy driverStrategy, org.apache.flink.api.common.operators.util.FieldList driverKeyFields, boolean[] driverSortOrders)
-
-
Method Detail
-
getSingleInputNode
public SingleInputNode getSingleInputNode()
-
getInput
public Channel getInput()
Gets the input channel to this node.- Returns:
- The input channel to this node.
-
getPredecessor
public PlanNode getPredecessor()
Gets the predecessor of this node, i.e. the source of the input channel.- Returns:
- The predecessor of this node.
-
setDriverKeyInfo
public void setDriverKeyInfo(org.apache.flink.api.common.operators.util.FieldList keys, int id)Sets the key field indexes for the specified driver comparator.- Parameters:
keys- The key field indexes for the specified driver comparator.id- The ID of the driver comparator.
-
setDriverKeyInfo
public void setDriverKeyInfo(org.apache.flink.api.common.operators.util.FieldList keys, boolean[] sortOrder, int id)Sets the key field information for the specified driver comparator.- Parameters:
keys- The key field indexes for the specified driver comparator.sortOrder- The key sort order for the specified driver comparator.id- The ID of the driver comparator.
-
getKeys
public org.apache.flink.api.common.operators.util.FieldList getKeys(int id)
Gets the key field indexes for the specified driver comparator.- Parameters:
id- The id of the driver comparator for which the key field indexes are requested.- Returns:
- The key field indexes of the specified driver comparator.
-
getSortOrders
public boolean[] getSortOrders(int id)
Gets the sort order for the specified driver comparator.- Parameters:
id- The id of the driver comparator for which the sort order is requested.- Returns:
- The sort order of the specified driver comparator.
-
getComparator
public org.apache.flink.api.common.typeutils.TypeComparatorFactory<?> getComparator(int id)
Gets the specified comparator from this PlanNode.- Parameters:
id- The ID of the requested comparator.- Returns:
- The specified comparator.
-
setComparator
public void setComparator(org.apache.flink.api.common.typeutils.TypeComparatorFactory<?> comparator, int id)Sets the specified comparator for this PlanNode.- Parameters:
comparator- The comparator to set.id- The ID of the comparator to set.
-
accept
public void accept(org.apache.flink.util.Visitor<PlanNode> visitor)
-
getPredecessors
public Iterable<PlanNode> getPredecessors()
Description copied from interface:DumpableNodeGets an iterator over the predecessors.- Specified by:
getPredecessorsin interfaceDumpableNode<PlanNode>- Specified by:
getPredecessorsin classPlanNode- Returns:
- An iterator over the predecessors.
-
hasDamOnPathDownTo
public PlanNode.SourceAndDamReport hasDamOnPathDownTo(PlanNode source)
Description copied from class:PlanNodeChecks whether this node has a dam on the way down to the given source node. This method returns either that (a) the source node is not found as a (transitive) child of this node, (b) the node is found, but no dam is on the path, or (c) the node is found and a dam is on the path.- Specified by:
hasDamOnPathDownToin classPlanNode- Parameters:
source- The node on the path to which the dam is sought.- Returns:
- The result whether the node is found and whether a dam is on the path.
-
getTrueArray
protected static boolean[] getTrueArray(int length)
-
-