Class PlanNode

    • Constructor Detail

      • PlanNode

        public PlanNode​(OptimizerNode template,
                        String nodeName,
                        org.apache.flink.runtime.operators.DriverStrategy strategy)
    • Method Detail

      • mergeBranchPlanMaps

        protected void mergeBranchPlanMaps​(PlanNode pred1,
                                           PlanNode pred2)
      • getOriginalOptimizerNode

        public OptimizerNode getOriginalOptimizerNode()
        Gets the node from the optimizer DAG for which this plan candidate node was created.
        Returns:
        The optimizer's DAG node.
      • getProgramOperator

        public org.apache.flink.api.common.operators.Operator<?> getProgramOperator()
        Gets the program operator that this node represents in the plan.
        Returns:
        The program operator this node represents in the plan.
      • getNodeName

        public String getNodeName()
        Gets the name of the plan node.
        Returns:
        The name of the plan node.
      • getMemoryConsumerWeight

        public int getMemoryConsumerWeight()
      • getRelativeMemoryPerSubTask

        public double getRelativeMemoryPerSubTask()
        Gets the memory dedicated to each sub-task for this node.
        Returns:
        The memory per task, in bytes.
      • setRelativeMemoryPerSubtask

        public void setRelativeMemoryPerSubtask​(double relativeMemoryPerSubtask)
        Sets the memory dedicated to each task for this node.
        Parameters:
        relativeMemoryPerSubtask - The relative memory per sub-task
      • getDriverStrategy

        public org.apache.flink.runtime.operators.DriverStrategy getDriverStrategy()
        Gets the driver strategy from this node. This determines for example for a match Pact whether to use a merge or a hybrid hash strategy.
        Returns:
        The driver strategy.
      • setDriverStrategy

        public void setDriverStrategy​(org.apache.flink.runtime.operators.DriverStrategy newDriverStrategy)
        Sets the driver strategy for this node. Usually should not be changed.
        Parameters:
        newDriverStrategy - The driver strategy.
      • getLocalProperties

        public LocalProperties getLocalProperties()
        Gets the local properties from this PlanNode.
        Returns:
        The local properties.
      • getGlobalProperties

        public GlobalProperties getGlobalProperties()
        Gets the global properties from this PlanNode.
        Returns:
        The global properties.
      • getNodeCosts

        public Costs getNodeCosts()
        Gets the costs incurred by this node. The costs reflect also the costs incurred by the shipping strategies of the incoming connections.
        Returns:
        The node-costs, or null, if not yet set.
      • getCumulativeCosts

        public Costs getCumulativeCosts()
        Gets the cumulative costs of this nose. The cumulative costs are the sum of the costs of this node and of all nodes in the subtree below this node.
        Returns:
        The cumulative costs, or null, if not yet set.
      • getCumulativeCostsShare

        public Costs getCumulativeCostsShare()
      • setCosts

        public void setCosts​(Costs nodeCosts)
        Sets the basic cost for this node to the given value, and sets the cumulative costs to those costs plus the cost shares of all inputs (regular and broadcast).
        Parameters:
        nodeCosts - The already knows costs for this node (this cost a produces by a concrete OptimizerNode subclass.
      • setParallelism

        public void setParallelism​(int parallelism)
      • getParallelism

        public int getParallelism()
      • getMinResources

        public org.apache.flink.api.common.operators.ResourceSpec getMinResources()
      • getPreferredResources

        public org.apache.flink.api.common.operators.ResourceSpec getPreferredResources()
      • getGuaranteedAvailableMemory

        public long getGuaranteedAvailableMemory()
      • setBroadcastInputs

        public void setBroadcastInputs​(List<NamedChannel> broadcastInputs)
        Sets a list of all broadcast inputs attached to this node.
      • getBroadcastInputs

        public List<NamedChannel> getBroadcastInputs()
        Gets a list of all broadcast inputs attached to this node.
      • addOutgoingChannel

        public void addOutgoingChannel​(Channel channel)
        Adds a channel to a successor node to this node.
        Parameters:
        channel - The channel to the successor.
      • getOutgoingChannels

        public List<Channel> getOutgoingChannels()
        Gets a list of all outgoing channels leading to successors.
        Returns:
        A list of all channels leading to successors.
      • updatePropertiesWithUniqueSets

        public void updatePropertiesWithUniqueSets​(Set<org.apache.flink.api.common.operators.util.FieldSet> uniqueFieldCombinations)
      • setPruningMarker

        public void setPruningMarker()
        Sets the pruning marker to true.
      • isPruneMarkerSet

        public boolean isPruneMarkerSet()
        Checks whether the pruning marker was set.
        Returns:
        True, if the pruning marker was set, false otherwise.
      • isOnDynamicPath

        public boolean isOnDynamicPath()
      • getCostWeight

        public int getCostWeight()
      • hasDamOnPathDownTo

        public abstract PlanNode.SourceAndDamReport hasDamOnPathDownTo​(PlanNode source)
        Checks 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.
        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.