Class RowTimeMiniBatchAssginerOperator
- java.lang.Object
-
- org.apache.flink.streaming.api.operators.AbstractStreamOperator<org.apache.flink.table.data.RowData>
-
- org.apache.flink.table.runtime.operators.wmassigners.RowTimeMiniBatchAssginerOperator
-
- All Implemented Interfaces:
Serializable,org.apache.flink.api.common.state.CheckpointListener,org.apache.flink.streaming.api.operators.Input<org.apache.flink.table.data.RowData>,org.apache.flink.streaming.api.operators.KeyContext,org.apache.flink.streaming.api.operators.KeyContextHandler,org.apache.flink.streaming.api.operators.OneInputStreamOperator<org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData>,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
public class RowTimeMiniBatchAssginerOperator extends org.apache.flink.streaming.api.operators.AbstractStreamOperator<org.apache.flink.table.data.RowData> implements org.apache.flink.streaming.api.operators.OneInputStreamOperator<org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData>A stream operator that emits watermark in a given event-time interval. This mini-batch assigner works in event time, which means the watermark is forwarded from upstream but filtered by the event-time interval. The downstream operators (e.g. windows) will trigger mini-batch once the received watermark is advanced. So only the watermarks that across the event-time interval boundary (i.e. window-end) will be forwarded. This is for windows to have most efficient mini-batch.For example, if this operator receives watermarks
0,1,2,3 ..., 19, 20, 21. The downstream operator is a 5-size window aggregate, then the mini-batch interval is 5 (this is inferred by rules). Then only4, 9, 14, 19will be forwarded, because they are the watermarks trigger windows.The difference between this operator and
ProcTimeMiniBatchAssignerOperatoris that, this operator forwards watermarks from upstream, but the other generates watermarks by itself using processing time.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RowTimeMiniBatchAssginerOperator(long minibatchInterval)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfinish()voidopen()voidprocessElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<org.apache.flink.table.data.RowData> element)voidprocessWatermark(org.apache.flink.streaming.api.watermark.Watermark mark)-
Methods inherited from class org.apache.flink.streaming.api.operators.AbstractStreamOperator
close, getChainingStrategy, getContainingTask, getCurrentKey, getExecutionConfig, getInternalTimerService, getKeyedStateBackend, getKeyedStateStore, getMetricGroup, getOperatorConfig, getOperatorID, getOperatorName, getOperatorStateBackend, getOrCreateKeyedState, getPartitionedState, getPartitionedState, getProcessingTimeService, getRuntimeContext, getTimeServiceManager, getUserCodeClassloader, hasKeyContext1, hasKeyContext2, initializeState, initializeState, isUsingCustomRawKeyedState, notifyCheckpointAborted, notifyCheckpointComplete, prepareSnapshotPreBarrier, processLatencyMarker, processLatencyMarker1, processLatencyMarker2, processRecordAttributes, processRecordAttributes1, processRecordAttributes2, processWatermark1, processWatermark2, processWatermarkStatus, processWatermarkStatus1, processWatermarkStatus2, reportOrForwardLatencyMarker, setChainingStrategy, setCurrentKey, setKeyContextElement1, setKeyContextElement2, setProcessingTimeService, setup, snapshotState, snapshotState
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.api.common.state.CheckpointListener
notifyCheckpointAborted, notifyCheckpointComplete
-
Methods inherited from interface org.apache.flink.streaming.api.operators.Input
processLatencyMarker, processRecordAttributes, processWatermarkStatus
-
Methods inherited from interface org.apache.flink.streaming.api.operators.KeyContext
getCurrentKey, setCurrentKey
-
Methods inherited from interface org.apache.flink.streaming.api.operators.KeyContextHandler
hasKeyContext
-
-
-
-
Method Detail
-
open
public void open() throws Exception- Specified by:
openin interfaceorg.apache.flink.streaming.api.operators.StreamOperator<org.apache.flink.table.data.RowData>- Overrides:
openin classorg.apache.flink.streaming.api.operators.AbstractStreamOperator<org.apache.flink.table.data.RowData>- Throws:
Exception
-
processElement
public void processElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<org.apache.flink.table.data.RowData> element) throws Exception- Specified by:
processElementin interfaceorg.apache.flink.streaming.api.operators.Input<org.apache.flink.table.data.RowData>- Throws:
Exception
-
processWatermark
public void processWatermark(org.apache.flink.streaming.api.watermark.Watermark mark) throws Exception- Specified by:
processWatermarkin interfaceorg.apache.flink.streaming.api.operators.Input<org.apache.flink.table.data.RowData>- Overrides:
processWatermarkin classorg.apache.flink.streaming.api.operators.AbstractStreamOperator<org.apache.flink.table.data.RowData>- Throws:
Exception
-
finish
public void finish() throws Exception- 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
-
-