Class DagConnection

  • All Implemented Interfaces:
    EstimateProvider, DumpableConnection<OptimizerNode>

    public class DagConnection
    extends Object
    implements EstimateProvider, DumpableConnection<OptimizerNode>
    A connection between two operators. Represents an intermediate result and a data exchange between the two operators.

    The data exchange has a mode in which it performs (batch / pipelined).

    The data exchange strategy may be set on this connection, in which case it is fixed and will not be determined during candidate plan enumeration.

    During the enumeration of interesting properties, this connection also holds all interesting properties generated by the successor operator.

    • Constructor Detail

      • DagConnection

        public DagConnection​(OptimizerNode source,
                             OptimizerNode target,
                             org.apache.flink.api.common.ExecutionMode exchangeMode)
        Creates a new Connection between two nodes. The shipping strategy is by default null.
        Parameters:
        source - The source node.
        target - The target node.
        exchangeMode - The data exchange mode (pipelined / batch / batch only for shuffles / ... )
      • DagConnection

        public DagConnection​(OptimizerNode source,
                             OptimizerNode target,
                             org.apache.flink.runtime.operators.shipping.ShipStrategyType shipStrategy,
                             org.apache.flink.api.common.ExecutionMode exchangeMode)
        Creates a new Connection between two nodes.
        Parameters:
        source - The source node.
        target - The target node.
        shipStrategy - The shipping strategy.
        exchangeMode - The data exchange mode (pipelined / batch / batch only for shuffles / ... )
      • DagConnection

        public DagConnection​(OptimizerNode source,
                             org.apache.flink.api.common.ExecutionMode exchangeMode)
        Constructor to create a result from an operator that is not consumed by another operator.
        Parameters:
        source - The source node.
        exchangeMode - The data exchange mode (pipelined / batch / batch only for shuffles / ... )
    • Method Detail

      • getTarget

        public OptimizerNode getTarget()
        Gets the target of the connection.
        Returns:
        The target node.
      • getShipStrategy

        public org.apache.flink.runtime.operators.shipping.ShipStrategyType getShipStrategy()
        Gets the shipping strategy for this connection.
        Specified by:
        getShipStrategy in interface DumpableConnection<OptimizerNode>
        Returns:
        The connection's shipping strategy.
      • setShipStrategy

        public void setShipStrategy​(org.apache.flink.runtime.operators.shipping.ShipStrategyType strategy)
        Sets the shipping strategy for this connection.
        Parameters:
        strategy - The shipping strategy to be applied to this connection.
      • getDataExchangeMode

        public org.apache.flink.api.common.ExecutionMode getDataExchangeMode()
        Gets the data exchange mode to use for this connection.
        Returns:
        The data exchange mode to use for this connection.
      • markBreaksPipeline

        public void markBreaksPipeline()
        Marks that this connection should do a decoupled data exchange (such as batched) rather then pipeline data. Connections are marked as pipeline breakers to avoid deadlock situations.
      • isBreakingPipeline

        public boolean isBreakingPipeline()
        Checks whether this connection is marked to break the pipeline.
        Returns:
        True, if this connection is marked to break the pipeline, false otherwise.
      • getInterestingProperties

        public InterestingProperties getInterestingProperties()
        Gets the interesting properties object for this pact connection. If the interesting properties for this connections have not yet been set, this method returns null.
        Returns:
        The collection of all interesting properties, or null, if they have not yet been set.
      • setInterestingProperties

        public void setInterestingProperties​(InterestingProperties props)
        Sets the interesting properties for this pact connection.
        Parameters:
        props - The interesting properties.
      • clearInterestingProperties

        public void clearInterestingProperties()
      • initMaxDepth

        public void initMaxDepth()
      • getMaxDepth

        public int getMaxDepth()
      • getEstimatedNumRecords

        public long getEstimatedNumRecords()
        Description copied from interface: EstimateProvider
        Gets the estimated number of records in the output of this node.
        Specified by:
        getEstimatedNumRecords in interface EstimateProvider
        Returns:
        The estimated number of records.
      • getMaterializationMode

        public TempMode getMaterializationMode()
      • setMaterializationMode

        public void setMaterializationMode​(TempMode materializationMode)
      • isOnDynamicPath

        public boolean isOnDynamicPath()
      • getCostWeight

        public int getCostWeight()