Class MiniBatchStreamingJoinOperator

  • 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.SetupableStreamOperator<org.apache.flink.table.data.RowData>, org.apache.flink.streaming.api.operators.StreamOperator<org.apache.flink.table.data.RowData>, org.apache.flink.streaming.api.operators.StreamOperatorStateHandler.CheckpointedStreamOperator, org.apache.flink.streaming.api.operators.TwoInputStreamOperator<org.apache.flink.table.data.RowData,​org.apache.flink.table.data.RowData,​org.apache.flink.table.data.RowData>, BundleTriggerCallback

    public abstract class MiniBatchStreamingJoinOperator
    extends StreamingJoinOperator
    implements BundleTriggerCallback
    Streaming unbounded Join base operator which support mini-batch join.
    See Also:
    Serialized Form
    • Constructor Detail

      • MiniBatchStreamingJoinOperator

        public MiniBatchStreamingJoinOperator​(org.apache.flink.table.runtime.operators.join.stream.MiniBatchStreamingJoinOperator.MiniBatchStreamingJoinParameter parameter)
    • Method Detail

      • open

        public void open()
                  throws Exception
        Specified by:
        open in interface org.apache.flink.streaming.api.operators.StreamOperator<org.apache.flink.table.data.RowData>
        Overrides:
        open in class StreamingJoinOperator
        Throws:
        Exception
      • processElement1

        public void processElement1​(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<org.apache.flink.table.data.RowData> element)
                             throws Exception
        Specified by:
        processElement1 in interface org.apache.flink.streaming.api.operators.TwoInputStreamOperator<org.apache.flink.table.data.RowData,​org.apache.flink.table.data.RowData,​org.apache.flink.table.data.RowData>
        Overrides:
        processElement1 in class StreamingJoinOperator
        Throws:
        Exception
      • processElement2

        public void processElement2​(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<org.apache.flink.table.data.RowData> element)
                             throws Exception
        Specified by:
        processElement2 in interface org.apache.flink.streaming.api.operators.TwoInputStreamOperator<org.apache.flink.table.data.RowData,​org.apache.flink.table.data.RowData,​org.apache.flink.table.data.RowData>
        Overrides:
        processElement2 in class StreamingJoinOperator
        Throws:
        Exception
      • processWatermark1

        public void processWatermark1​(org.apache.flink.streaming.api.watermark.Watermark mark)
                               throws Exception
        Specified by:
        processWatermark1 in interface org.apache.flink.streaming.api.operators.TwoInputStreamOperator<org.apache.flink.table.data.RowData,​org.apache.flink.table.data.RowData,​org.apache.flink.table.data.RowData>
        Overrides:
        processWatermark1 in class org.apache.flink.streaming.api.operators.AbstractStreamOperator<org.apache.flink.table.data.RowData>
        Throws:
        Exception
      • processWatermark2

        public void processWatermark2​(org.apache.flink.streaming.api.watermark.Watermark mark)
                               throws Exception
        Specified by:
        processWatermark2 in interface org.apache.flink.streaming.api.operators.TwoInputStreamOperator<org.apache.flink.table.data.RowData,​org.apache.flink.table.data.RowData,​org.apache.flink.table.data.RowData>
        Overrides:
        processWatermark2 in class org.apache.flink.streaming.api.operators.AbstractStreamOperator<org.apache.flink.table.data.RowData>
        Throws:
        Exception
      • prepareSnapshotPreBarrier

        public void prepareSnapshotPreBarrier​(long checkpointId)
                                       throws Exception
        Specified by:
        prepareSnapshotPreBarrier in interface org.apache.flink.streaming.api.operators.StreamOperator<org.apache.flink.table.data.RowData>
        Overrides:
        prepareSnapshotPreBarrier in class org.apache.flink.streaming.api.operators.AbstractStreamOperator<org.apache.flink.table.data.RowData>
        Throws:
        Exception
      • finish

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

        public void finishBundle()
                          throws Exception
        Description copied from interface: BundleTriggerCallback
        This method is invoked to finish current bundle and start a new one when the trigger was fired.
        Specified by:
        finishBundle in interface BundleTriggerCallback
        Throws:
        Exception - This method may throw exceptions. Throwing an exception will cause the operation to fail and may trigger recovery.
      • processSingleSideBundles

        protected void processSingleSideBundles​(BufferBundle<?> inputBuffer,
                                                JoinRecordStateView inputSideStateView,
                                                JoinRecordStateView otherSideStateView,
                                                boolean inputIsLeft)
                                         throws Exception
        RetractMsg+accumulatingMsg would be optimized which would keep sending retractMsg but do not deal with state.
        Throws:
        Exception