Class TwoInputTransformation<IN1,​IN2,​OUT>

  • Type Parameters:
    IN1 - The type of the elements in the first input Transformation
    IN2 - The type of the elements in the second input Transformation
    OUT - The type of the elements that result from this TwoInputTransformation

    @Internal
    public class TwoInputTransformation<IN1,​IN2,​OUT>
    extends PhysicalTransformation<OUT>
    This Transformation represents the application of a TwoInputStreamOperator to two input Transformations. The result is again only one stream.
    • Field Summary

      • Fields inherited from class org.apache.flink.api.dag.Transformation

        bufferTimeout, description, id, name, outputType, typeUsed, UPPER_BOUND_MAX_PARALLELISM
    • Constructor Summary

      Constructors 
      Constructor Description
      TwoInputTransformation​(org.apache.flink.api.dag.Transformation<IN1> input1, org.apache.flink.api.dag.Transformation<IN2> input2, String name, StreamOperatorFactory<OUT> operatorFactory, org.apache.flink.api.common.typeinfo.TypeInformation<OUT> outputType, int parallelism)  
      TwoInputTransformation​(org.apache.flink.api.dag.Transformation<IN1> input1, org.apache.flink.api.dag.Transformation<IN2> input2, String name, StreamOperatorFactory<OUT> operatorFactory, org.apache.flink.api.common.typeinfo.TypeInformation<OUT> outputType, int parallelism, boolean parallelismConfigured)
      Creates a new TwoInputTransformation from the given inputs and operator.
      TwoInputTransformation​(org.apache.flink.api.dag.Transformation<IN1> input1, org.apache.flink.api.dag.Transformation<IN2> input2, String name, TwoInputStreamOperator<IN1,​IN2,​OUT> operator, org.apache.flink.api.common.typeinfo.TypeInformation<OUT> outputType, int parallelism)
      Creates a new TwoInputTransformation from the given inputs and operator.
      TwoInputTransformation​(org.apache.flink.api.dag.Transformation<IN1> input1, org.apache.flink.api.dag.Transformation<IN2> input2, String name, TwoInputStreamOperator<IN1,​IN2,​OUT> operator, org.apache.flink.api.common.typeinfo.TypeInformation<OUT> outputType, int parallelism, boolean parallelismConfigured)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void enableAsyncState()  
      org.apache.flink.api.dag.Transformation<IN1> getInput1()
      Returns the first input Transformation of this TwoInputTransformation.
      org.apache.flink.api.dag.Transformation<IN2> getInput2()
      Returns the second input Transformation of this TwoInputTransformation.
      List<org.apache.flink.api.dag.Transformation<?>> getInputs()  
      org.apache.flink.api.common.typeinfo.TypeInformation<IN1> getInputType1()
      Returns the TypeInformation for the elements from the first input.
      org.apache.flink.api.common.typeinfo.TypeInformation<IN2> getInputType2()
      Returns the TypeInformation for the elements from the second input.
      TwoInputStreamOperator<IN1,​IN2,​OUT> getOperator()  
      StreamOperatorFactory<OUT> getOperatorFactory()
      Returns the StreamOperatorFactory of this Transformation.
      org.apache.flink.api.java.functions.KeySelector<IN1,​?> getStateKeySelector1()
      Returns the KeySelector that must be used for partitioning keyed state in this Operation for the first input.
      org.apache.flink.api.java.functions.KeySelector<IN2,​?> getStateKeySelector2()
      Returns the KeySelector that must be used for partitioning keyed state in this Operation for the second input.
      org.apache.flink.api.common.typeinfo.TypeInformation<?> getStateKeyType()  
      protected List<org.apache.flink.api.dag.Transformation<?>> getTransitivePredecessorsInternal()  
      boolean isInternalSorterSupported()  
      boolean isOutputOnlyAfterEndOfStream()  
      void setChainingStrategy​(ChainingStrategy strategy)
      Sets the chaining strategy of this Transformation.
      void setStateKeySelectors​(org.apache.flink.api.java.functions.KeySelector<IN1,​?> stateKeySelector1, org.apache.flink.api.java.functions.KeySelector<IN2,​?> stateKeySelector2)
      Sets the KeySelectors that must be used for partitioning keyed state of this transformation.
      void setStateKeyType​(org.apache.flink.api.common.typeinfo.TypeInformation<?> stateKeyType)  
      • Methods inherited from class org.apache.flink.api.dag.Transformation

        declareManagedMemoryUseCaseAtOperatorScope, declareManagedMemoryUseCaseAtSlotScope, equals, getAttribute, getBufferTimeout, getCoLocationGroupKey, getDescription, getId, getManagedMemoryOperatorScopeUseCaseWeights, getManagedMemorySlotScopeUseCases, getMaxParallelism, getMinResources, getName, getNewNodeId, getOutputType, getParallelism, getPreferredResources, getSlotSharingGroup, getTransitivePredecessors, getUid, getUserProvidedNodeHash, hashCode, isParallelismConfigured, setAttribute, setBufferTimeout, setCoLocationGroupKey, setDescription, setMaxParallelism, setName, setOutputType, setParallelism, setParallelism, setResources, setSlotSharingGroup, setSlotSharingGroup, setUid, setUidHash, toString, updateManagedMemoryStateBackendUseCase
    • Constructor Detail

      • TwoInputTransformation

        public TwoInputTransformation​(org.apache.flink.api.dag.Transformation<IN1> input1,
                                      org.apache.flink.api.dag.Transformation<IN2> input2,
                                      String name,
                                      TwoInputStreamOperator<IN1,​IN2,​OUT> operator,
                                      org.apache.flink.api.common.typeinfo.TypeInformation<OUT> outputType,
                                      int parallelism)
        Creates a new TwoInputTransformation from the given inputs and operator.
        Parameters:
        input1 - The first input Transformation
        input2 - The second input Transformation
        name - The name of the Transformation, this will be shown in Visualizations and the Log
        operator - The TwoInputStreamOperator
        outputType - The type of the elements produced by this Transformation
        parallelism - The parallelism of this Transformation
      • TwoInputTransformation

        public TwoInputTransformation​(org.apache.flink.api.dag.Transformation<IN1> input1,
                                      org.apache.flink.api.dag.Transformation<IN2> input2,
                                      String name,
                                      TwoInputStreamOperator<IN1,​IN2,​OUT> operator,
                                      org.apache.flink.api.common.typeinfo.TypeInformation<OUT> outputType,
                                      int parallelism,
                                      boolean parallelismConfigured)
      • TwoInputTransformation

        public TwoInputTransformation​(org.apache.flink.api.dag.Transformation<IN1> input1,
                                      org.apache.flink.api.dag.Transformation<IN2> input2,
                                      String name,
                                      StreamOperatorFactory<OUT> operatorFactory,
                                      org.apache.flink.api.common.typeinfo.TypeInformation<OUT> outputType,
                                      int parallelism)
      • TwoInputTransformation

        public TwoInputTransformation​(org.apache.flink.api.dag.Transformation<IN1> input1,
                                      org.apache.flink.api.dag.Transformation<IN2> input2,
                                      String name,
                                      StreamOperatorFactory<OUT> operatorFactory,
                                      org.apache.flink.api.common.typeinfo.TypeInformation<OUT> outputType,
                                      int parallelism,
                                      boolean parallelismConfigured)
        Creates a new TwoInputTransformation from the given inputs and operator.
        Parameters:
        input1 - The first input Transformation
        input2 - The second input Transformation
        name - The name of the Transformation, this will be shown in Visualizations and the Log
        operatorFactory - The TwoInputStreamOperator factory
        outputType - The type of the elements produced by this Transformation
        parallelism - The parallelism of this Transformation
        parallelismConfigured - If true, the parallelism of the transformation is explicitly set and should be respected. Otherwise the parallelism can be changed at runtime.
    • Method Detail

      • getInput1

        public org.apache.flink.api.dag.Transformation<IN1> getInput1()
        Returns the first input Transformation of this TwoInputTransformation.
      • getInput2

        public org.apache.flink.api.dag.Transformation<IN2> getInput2()
        Returns the second input Transformation of this TwoInputTransformation.
      • getInputs

        public List<org.apache.flink.api.dag.Transformation<?>> getInputs()
        Specified by:
        getInputs in class org.apache.flink.api.dag.Transformation<OUT>
      • getInputType1

        public org.apache.flink.api.common.typeinfo.TypeInformation<IN1> getInputType1()
        Returns the TypeInformation for the elements from the first input.
      • getInputType2

        public org.apache.flink.api.common.typeinfo.TypeInformation<IN2> getInputType2()
        Returns the TypeInformation for the elements from the second input.
      • getOperatorFactory

        public StreamOperatorFactory<OUT> getOperatorFactory()
        Returns the StreamOperatorFactory of this Transformation.
      • setStateKeySelectors

        public void setStateKeySelectors​(org.apache.flink.api.java.functions.KeySelector<IN1,​?> stateKeySelector1,
                                         org.apache.flink.api.java.functions.KeySelector<IN2,​?> stateKeySelector2)
        Sets the KeySelectors that must be used for partitioning keyed state of this transformation.
        Parameters:
        stateKeySelector1 - The KeySelector to set for the first input
        stateKeySelector2 - The KeySelector to set for the first input
      • setStateKeyType

        public void setStateKeyType​(org.apache.flink.api.common.typeinfo.TypeInformation<?> stateKeyType)
      • getStateKeyType

        public org.apache.flink.api.common.typeinfo.TypeInformation<?> getStateKeyType()
      • getTransitivePredecessorsInternal

        protected List<org.apache.flink.api.dag.Transformation<?>> getTransitivePredecessorsInternal()
        Specified by:
        getTransitivePredecessorsInternal in class org.apache.flink.api.dag.Transformation<OUT>
      • isOutputOnlyAfterEndOfStream

        public boolean isOutputOnlyAfterEndOfStream()
      • isInternalSorterSupported

        public boolean isInternalSorterSupported()
      • enableAsyncState

        public void enableAsyncState()
        Overrides:
        enableAsyncState in class org.apache.flink.api.dag.Transformation<OUT>