Class TableAbstractCoUdfStreamOperator<OUT,​LEFT_FUNC extends org.apache.flink.api.common.functions.Function,​RIGHT_FUNC extends org.apache.flink.api.common.functions.Function>

  • Type Parameters:
    OUT - The output type of the operator
    LEFT_FUNC - The type of the triggered user function for left input
    RIGHT_FUNC - The type of the triggered user function for right input
    All Implemented Interfaces:
    Serializable, org.apache.flink.api.common.state.CheckpointListener, org.apache.flink.streaming.api.operators.KeyContext, org.apache.flink.streaming.api.operators.KeyContextHandler, org.apache.flink.streaming.api.operators.OutputTypeConfigurable<OUT>, org.apache.flink.streaming.api.operators.StreamOperator<OUT>, org.apache.flink.streaming.api.operators.StreamOperatorStateHandler.CheckpointedStreamOperator, org.apache.flink.streaming.api.operators.YieldingOperator<OUT>
    Direct Known Subclasses:
    StreamingDeltaJoinOperator

    public abstract class TableAbstractCoUdfStreamOperator<OUT,​LEFT_FUNC extends org.apache.flink.api.common.functions.Function,​RIGHT_FUNC extends org.apache.flink.api.common.functions.Function>
    extends org.apache.flink.streaming.api.operators.AbstractStreamOperator<OUT>
    implements org.apache.flink.streaming.api.operators.OutputTypeConfigurable<OUT>
    This is used as the base class for operators that have two user-defined function for left and right side. This class handles the opening and closing of the user-defined functions, as part of the operator life cycle.

    This TableAbstractCoUdfStreamOperator is similar with AbstractUdfStreamOperator, and the only differences is TableAbstractCoUdfStreamOperator can handle two inputs.

    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected LEFT_FUNC leftTriggeredUserFunction
      The triggered user function for left side.
      protected RIGHT_FUNC rightTriggeredUserFunction
      The triggered user function for right side.
      • Fields inherited from class org.apache.flink.streaming.api.operators.AbstractStreamOperator

        combinedWatermark, config, lastRecordAttributes1, lastRecordAttributes2, latencyStats, LOG, metrics, output, processingTimeService, stateHandler, stateKeySelector1, stateKeySelector2, timeServiceManager
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      void finish()  
      LEFT_FUNC getLeftTriggeredUserFunction()
      Gets the triggered user function executed in this operator.
      RIGHT_FUNC getRightTriggeredUserFunction()  
      void initializeState​(org.apache.flink.runtime.state.StateInitializationContext context)  
      void notifyCheckpointAborted​(long checkpointId)  
      void notifyCheckpointComplete​(long checkpointId)  
      void open()  
      void setOutputType​(org.apache.flink.api.common.typeinfo.TypeInformation<OUT> outTypeInfo, org.apache.flink.api.common.ExecutionConfig executionConfig)  
      void setup​(org.apache.flink.streaming.runtime.tasks.StreamTask<?,​?> containingTask, org.apache.flink.streaming.api.graph.StreamConfig config, org.apache.flink.streaming.api.operators.Output<org.apache.flink.streaming.runtime.streamrecord.StreamRecord<OUT>> output)  
      void snapshotState​(org.apache.flink.runtime.state.StateSnapshotContext context)  
      • Methods inherited from class org.apache.flink.streaming.api.operators.AbstractStreamOperator

        beforeInitializeStateHandler, getContainingTask, getCurrentKey, getExecutionConfig, getInternalTimerService, getKeyedStateBackend, getKeyedStateStore, getMetricGroup, getOperatorConfig, getOperatorID, getOperatorName, getOperatorStateBackend, getOrCreateKeyedState, getPartitionedState, getPartitionedState, getProcessingTimeService, getRuntimeContext, getStateKeySelector1, getStateKeySelector2, getTimeServiceManager, getUserCodeClassloader, hasKeyContext1, hasKeyContext2, initializeState, isAsyncKeyOrderedProcessingEnabled, isUsingCustomRawKeyedState, prepareSnapshotPreBarrier, processLatencyMarker, processLatencyMarker1, processLatencyMarker2, processRecordAttributes, processRecordAttributes1, processRecordAttributes2, processWatermark, processWatermark, processWatermark1, processWatermark1, processWatermark2, processWatermark2, processWatermarkStatus, processWatermarkStatus, processWatermarkStatus1, processWatermarkStatus2, reportOrForwardLatencyMarker, setCurrentKey, setKeyContextElement1, setKeyContextElement2, setMailboxExecutor, setProcessingTimeService, snapshotState, useSplittableTimers
      • Methods inherited from interface org.apache.flink.streaming.api.operators.KeyContextHandler

        hasKeyContext
      • Methods inherited from interface org.apache.flink.streaming.api.operators.StreamOperator

        getOperatorAttributes
    • Field Detail

      • leftTriggeredUserFunction

        protected final LEFT_FUNC extends org.apache.flink.api.common.functions.Function leftTriggeredUserFunction
        The triggered user function for left side.
      • rightTriggeredUserFunction

        protected final RIGHT_FUNC extends org.apache.flink.api.common.functions.Function rightTriggeredUserFunction
        The triggered user function for right side.
    • Constructor Detail

      • TableAbstractCoUdfStreamOperator

        public TableAbstractCoUdfStreamOperator​(LEFT_FUNC leftTriggeredUserFunction,
                                                RIGHT_FUNC rightTriggeredUserFunction)
    • Method Detail

      • getLeftTriggeredUserFunction

        public LEFT_FUNC getLeftTriggeredUserFunction()
        Gets the triggered user function executed in this operator.
        Returns:
        The triggered user function of this operator.
      • getRightTriggeredUserFunction

        public RIGHT_FUNC getRightTriggeredUserFunction()
      • setup

        public void setup​(org.apache.flink.streaming.runtime.tasks.StreamTask<?,​?> containingTask,
                          org.apache.flink.streaming.api.graph.StreamConfig config,
                          org.apache.flink.streaming.api.operators.Output<org.apache.flink.streaming.runtime.streamrecord.StreamRecord<OUT>> output)
        Overrides:
        setup in class org.apache.flink.streaming.api.operators.AbstractStreamOperator<OUT>
      • snapshotState

        public void snapshotState​(org.apache.flink.runtime.state.StateSnapshotContext context)
                           throws Exception
        Specified by:
        snapshotState in interface org.apache.flink.streaming.api.operators.StreamOperatorStateHandler.CheckpointedStreamOperator
        Overrides:
        snapshotState in class org.apache.flink.streaming.api.operators.AbstractStreamOperator<OUT>
        Throws:
        Exception
      • initializeState

        public void initializeState​(org.apache.flink.runtime.state.StateInitializationContext context)
                             throws Exception
        Specified by:
        initializeState in interface org.apache.flink.streaming.api.operators.StreamOperatorStateHandler.CheckpointedStreamOperator
        Overrides:
        initializeState in class org.apache.flink.streaming.api.operators.AbstractStreamOperator<OUT>
        Throws:
        Exception
      • open

        public void open()
                  throws Exception
        Specified by:
        open in interface org.apache.flink.streaming.api.operators.StreamOperator<OUT>
        Overrides:
        open in class org.apache.flink.streaming.api.operators.AbstractStreamOperator<OUT>
        Throws:
        Exception
      • finish

        public void finish()
                    throws Exception
        Specified by:
        finish in interface org.apache.flink.streaming.api.operators.StreamOperator<OUT>
        Overrides:
        finish in class org.apache.flink.streaming.api.operators.AbstractStreamOperator<OUT>
        Throws:
        Exception
      • close

        public void close()
                   throws Exception
        Specified by:
        close in interface org.apache.flink.streaming.api.operators.StreamOperator<OUT>
        Overrides:
        close in class org.apache.flink.streaming.api.operators.AbstractStreamOperator<OUT>
        Throws:
        Exception
      • notifyCheckpointComplete

        public void notifyCheckpointComplete​(long checkpointId)
                                      throws Exception
        Specified by:
        notifyCheckpointComplete in interface org.apache.flink.api.common.state.CheckpointListener
        Overrides:
        notifyCheckpointComplete in class org.apache.flink.streaming.api.operators.AbstractStreamOperator<OUT>
        Throws:
        Exception
      • notifyCheckpointAborted

        public void notifyCheckpointAborted​(long checkpointId)
                                     throws Exception
        Specified by:
        notifyCheckpointAborted in interface org.apache.flink.api.common.state.CheckpointListener
        Overrides:
        notifyCheckpointAborted in class org.apache.flink.streaming.api.operators.AbstractStreamOperator<OUT>
        Throws:
        Exception
      • setOutputType

        public void setOutputType​(org.apache.flink.api.common.typeinfo.TypeInformation<OUT> outTypeInfo,
                                  org.apache.flink.api.common.ExecutionConfig executionConfig)
        Specified by:
        setOutputType in interface org.apache.flink.streaming.api.operators.OutputTypeConfigurable<OUT>