Class MiniBatchStreamingJoinOperator
java.lang.Object
org.apache.flink.streaming.api.operators.AbstractStreamOperator<org.apache.flink.table.data.RowData>
org.apache.flink.table.runtime.operators.join.stream.AbstractStreamingJoinOperator
org.apache.flink.table.runtime.operators.join.stream.StreamingJoinOperator
org.apache.flink.table.runtime.operators.join.stream.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.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> org.apache.flink.streaming.api.operators.YieldingOperator<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:
-
Field Summary
Fields inherited from class org.apache.flink.table.runtime.operators.join.stream.StreamingJoinOperator
leftIsOuter, leftRecordStateView, rightIsOuter, rightRecordStateViewFields inherited from class org.apache.flink.table.runtime.operators.join.stream.AbstractStreamingJoinOperator
collector, joinCondition, LEFT_RECORDS_STATE_NAME, leftInputSideSpec, leftStateRetentionTime, leftType, RIGHT_RECORDS_STATE_NAME, rightInputSideSpec, rightStateRetentionTime, rightTypeFields inherited from class org.apache.flink.streaming.api.operators.AbstractStreamOperator
combinedWatermark, config, lastRecordAttributes1, lastRecordAttributes2, latencyStats, LOG, metrics, output, processingTimeService, stateHandler, stateKeySelector1, stateKeySelector2, timeServiceManager -
Constructor Summary
ConstructorsConstructorDescriptionMiniBatchStreamingJoinOperator(org.apache.flink.table.runtime.operators.join.stream.MiniBatchStreamingJoinOperator.MiniBatchStreamingJoinParameter parameter) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidfinish()voidThis method is invoked to finish current bundle and start a new one when the trigger was fired.newMiniBatchStreamJoinOperator(FlinkJoinType joinType, InternalTypeInfo<org.apache.flink.table.data.RowData> leftType, InternalTypeInfo<org.apache.flink.table.data.RowData> rightType, GeneratedJoinCondition generatedJoinCondition, JoinInputSideSpec leftInputSideSpec, JoinInputSideSpec rightInputSideSpec, boolean leftIsOuter, boolean rightIsOuter, boolean[] filterNullKeys, long leftStateRetentionTime, long rightStateRetentionTime, CoBundleTrigger<org.apache.flink.table.data.RowData, org.apache.flink.table.data.RowData> coBundleTrigger) voidopen()voidprepareSnapshotPreBarrier(long checkpointId) protected abstract voidprocessBundles(BufferBundle<?> leftBuffer, BufferBundle<?> rightBuffer) voidprocessElement1(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<org.apache.flink.table.data.RowData> element) voidprocessElement2(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<org.apache.flink.table.data.RowData> element) protected voidprocessSingleSideBundles(BufferBundle<?> inputBuffer, JoinRecordStateView inputSideStateView, JoinRecordStateView otherSideStateView, boolean inputIsLeft) RetractMsg+accumulatingMsg would be optimized which would keep sending retractMsg but do not deal with state.voidprocessWatermark1(org.apache.flink.streaming.api.watermark.Watermark mark) voidprocessWatermark2(org.apache.flink.streaming.api.watermark.Watermark mark) Methods inherited from class org.apache.flink.table.runtime.operators.join.stream.StreamingJoinOperator
processElementMethods 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, initializeState, isAsyncStateProcessingEnabled, isUsingCustomRawKeyedState, notifyCheckpointAborted, notifyCheckpointComplete, processLatencyMarker, processLatencyMarker1, processLatencyMarker2, processRecordAttributes, processRecordAttributes1, processRecordAttributes2, processWatermark, processWatermark, processWatermark1, processWatermark2, processWatermarkStatus, processWatermarkStatus, processWatermarkStatus1, processWatermarkStatus2, reportOrForwardLatencyMarker, setCurrentKey, setKeyContextElement1, setKeyContextElement2, setMailboxExecutor, setProcessingTimeService, setup, snapshotState, snapshotState, useSplittableTimersMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.flink.api.common.state.CheckpointListener
notifyCheckpointAborted, notifyCheckpointCompleteMethods inherited from interface org.apache.flink.streaming.api.operators.KeyContext
getCurrentKey, setCurrentKeyMethods inherited from interface org.apache.flink.streaming.api.operators.KeyContextHandler
hasKeyContextMethods inherited from interface org.apache.flink.streaming.api.operators.StreamOperator
getMetricGroup, getOperatorAttributes, getOperatorID, initializeState, setKeyContextElement1, setKeyContextElement2, snapshotStateMethods inherited from interface org.apache.flink.streaming.api.operators.TwoInputStreamOperator
processLatencyMarker1, processLatencyMarker2, processRecordAttributes1, processRecordAttributes2, processWatermark1, processWatermark2, processWatermarkStatus1, processWatermarkStatus2
-
Constructor Details
-
MiniBatchStreamingJoinOperator
public MiniBatchStreamingJoinOperator(org.apache.flink.table.runtime.operators.join.stream.MiniBatchStreamingJoinOperator.MiniBatchStreamingJoinParameter parameter)
-
-
Method Details
-
open
- Specified by:
openin interfaceorg.apache.flink.streaming.api.operators.StreamOperator<org.apache.flink.table.data.RowData>- Overrides:
openin classStreamingJoinOperator- Throws:
Exception
-
processElement1
public void processElement1(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<org.apache.flink.table.data.RowData> element) throws Exception - Specified by:
processElement1in interfaceorg.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:
processElement1in classStreamingJoinOperator- Throws:
Exception
-
processElement2
public void processElement2(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<org.apache.flink.table.data.RowData> element) throws Exception - Specified by:
processElement2in interfaceorg.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:
processElement2in classStreamingJoinOperator- Throws:
Exception
-
processWatermark1
public void processWatermark1(org.apache.flink.streaming.api.watermark.Watermark mark) throws Exception - Specified by:
processWatermark1in interfaceorg.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:
processWatermark1in classorg.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:
processWatermark2in interfaceorg.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:
processWatermark2in classorg.apache.flink.streaming.api.operators.AbstractStreamOperator<org.apache.flink.table.data.RowData>- Throws:
Exception
-
prepareSnapshotPreBarrier
- Specified by:
prepareSnapshotPreBarrierin interfaceorg.apache.flink.streaming.api.operators.StreamOperator<org.apache.flink.table.data.RowData>- Overrides:
prepareSnapshotPreBarrierin classorg.apache.flink.streaming.api.operators.AbstractStreamOperator<org.apache.flink.table.data.RowData>- Throws:
Exception
-
finish
- Specified by:
finishin interfaceorg.apache.flink.streaming.api.operators.StreamOperator<org.apache.flink.table.data.RowData>- Overrides:
finishin classorg.apache.flink.streaming.api.operators.AbstractStreamOperator<org.apache.flink.table.data.RowData>- Throws:
Exception
-
close
- Specified by:
closein interfaceorg.apache.flink.streaming.api.operators.StreamOperator<org.apache.flink.table.data.RowData>- Overrides:
closein classAbstractStreamingJoinOperator- Throws:
Exception
-
finishBundle
Description copied from interface:BundleTriggerCallbackThis method is invoked to finish current bundle and start a new one when the trigger was fired.- Specified by:
finishBundlein interfaceBundleTriggerCallback- Throws:
Exception- This method may throw exceptions. Throwing an exception will cause the operation to fail and may trigger recovery.
-
processBundles
protected abstract void processBundles(BufferBundle<?> leftBuffer, BufferBundle<?> rightBuffer) throws Exception - Throws:
Exception
-
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
-
newMiniBatchStreamJoinOperator
public static MiniBatchStreamingJoinOperator newMiniBatchStreamJoinOperator(FlinkJoinType joinType, InternalTypeInfo<org.apache.flink.table.data.RowData> leftType, InternalTypeInfo<org.apache.flink.table.data.RowData> rightType, GeneratedJoinCondition generatedJoinCondition, JoinInputSideSpec leftInputSideSpec, JoinInputSideSpec rightInputSideSpec, boolean leftIsOuter, boolean rightIsOuter, boolean[] filterNullKeys, long leftStateRetentionTime, long rightStateRetentionTime, CoBundleTrigger<org.apache.flink.table.data.RowData, org.apache.flink.table.data.RowData> coBundleTrigger)
-