Class AdaptiveJoinOperatorFactory<OUT>

  • Type Parameters:
    OUT - The output type of the operator
    All Implemented Interfaces:
    Serializable, org.apache.flink.streaming.api.operators.StreamOperatorFactory<OUT>, org.apache.flink.streaming.runtime.tasks.ProcessingTimeServiceAware, AdaptiveJoin

    @Internal
    public class AdaptiveJoinOperatorFactory<OUT>
    extends org.apache.flink.streaming.api.operators.AbstractStreamOperatorFactory<OUT>
    implements AdaptiveJoin
    Adaptive join factory.

    Note: This class will hold an AdaptiveJoin and serve as a proxy class to provide an interface externally. Due to runtime access visibility constraints with the table-planner module, the AdaptiveJoin object will be serialized during the Table Planner phase and will only be lazily deserialized before the dynamic generation of the JobGraph.

    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class org.apache.flink.streaming.api.operators.AbstractStreamOperatorFactory

        chainingStrategy, processingTimeService
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T extends org.apache.flink.streaming.api.operators.StreamOperator<OUT>>
      T
      createStreamOperator​(org.apache.flink.streaming.api.operators.StreamOperatorParameters<OUT> parameters)  
      org.apache.flink.streaming.api.operators.StreamOperatorFactory<?> genOperatorFactory​(ClassLoader classLoader, org.apache.flink.configuration.ReadableConfig config)
      Generates a StreamOperatorFactory for this join operator using the provided ClassLoader and config.
      FlinkJoinType getJoinType()
      Get the join type of the join operator.
      Class<? extends org.apache.flink.streaming.api.operators.StreamOperator> getStreamOperatorClass​(ClassLoader classLoader)  
      void markAsBroadcastJoin​(boolean canBeBroadcast, boolean leftIsBuild)
      Determine whether the adaptive join operator can be optimized as broadcast hash join and decide which input side is the build side or a smaller side.
      boolean shouldReorderInputs()
      Check if the adaptive join node needs to adjust the read order of the input sides.
      • Methods inherited from class org.apache.flink.streaming.api.operators.AbstractStreamOperatorFactory

        getChainingStrategy, getMailboxExecutor, setChainingStrategy, setMailboxExecutor, setProcessingTimeService
      • Methods inherited from interface org.apache.flink.streaming.api.operators.StreamOperatorFactory

        getOperatorAttributes, isInputTypeConfigurable, isLegacySource, isOutputTypeConfigurable, isStreamSource, setInputType, setOutputType
    • Constructor Detail

      • AdaptiveJoinOperatorFactory

        public AdaptiveJoinOperatorFactory​(byte[] adaptiveJoinSerialized)
    • Method Detail

      • genOperatorFactory

        public org.apache.flink.streaming.api.operators.StreamOperatorFactory<?> genOperatorFactory​(ClassLoader classLoader,
                                                                                                    org.apache.flink.configuration.ReadableConfig config)
        Description copied from interface: AdaptiveJoin
        Generates a StreamOperatorFactory for this join operator using the provided ClassLoader and config.
        Specified by:
        genOperatorFactory in interface AdaptiveJoin
        Parameters:
        classLoader - the ClassLoader to be used for loading classes.
        config - the configuration to be applied for creating the operator factory.
        Returns:
        a StreamOperatorFactory instance.
      • markAsBroadcastJoin

        public void markAsBroadcastJoin​(boolean canBeBroadcast,
                                        boolean leftIsBuild)
        Description copied from interface: AdaptiveJoin
        Determine whether the adaptive join operator can be optimized as broadcast hash join and decide which input side is the build side or a smaller side.
        Specified by:
        markAsBroadcastJoin in interface AdaptiveJoin
        Parameters:
        canBeBroadcast - whether the join operator can be optimized to broadcast hash join.
        leftIsBuild - whether the left input side is the build side.
      • shouldReorderInputs

        public boolean shouldReorderInputs()
        Description copied from interface: AdaptiveJoin
        Check if the adaptive join node needs to adjust the read order of the input sides. For the hash join operator, it is necessary to ensure that the build side is read first.
        Specified by:
        shouldReorderInputs in interface AdaptiveJoin
        Returns:
        whether the inputs should be reordered.
      • createStreamOperator

        public <T extends org.apache.flink.streaming.api.operators.StreamOperator<OUT>> T createStreamOperator​(org.apache.flink.streaming.api.operators.StreamOperatorParameters<OUT> parameters)
        Specified by:
        createStreamOperator in interface org.apache.flink.streaming.api.operators.StreamOperatorFactory<OUT>
      • getStreamOperatorClass

        public Class<? extends org.apache.flink.streaming.api.operators.StreamOperator> getStreamOperatorClass​(ClassLoader classLoader)
        Specified by:
        getStreamOperatorClass in interface org.apache.flink.streaming.api.operators.StreamOperatorFactory<OUT>