public class ProcTimeMiniBatchAssignerOperator extends AbstractStreamOperator<RowData> implements OneInputStreamOperator<RowData,RowData>, ProcessingTimeService.ProcessingTimeCallback
NOTE: currently, we use Watermark
to represents the mini-batch marker.
The difference between this operator and RowTimeMiniBatchAssginerOperator
is that,
this operator generates watermarks by itself using processing time, but the other forwards
watermarks from upstream.
chainingStrategy, config, latencyStats, LOG, metrics, output, processingTimeService
Constructor and Description |
---|
ProcTimeMiniBatchAssignerOperator(long intervalMs) |
Modifier and Type | Method and Description |
---|---|
void |
onProcessingTime(long timestamp)
This method is invoked with the time which the callback register for.
|
void |
open()
This method is called immediately before any elements are processed, it should contain the
operator's initialization logic, e.g.
|
void |
processElement(StreamRecord<RowData> element)
Processes one element that arrived on this input of the
MultipleInputStreamOperator . |
void |
processWatermark(Watermark mark)
Override the base implementation to completely ignore watermarks propagated from upstream (we
rely only on the
AssignerWithPeriodicWatermarks to emit watermarks from here). |
close, finish, 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, processWatermark1, processWatermark2, processWatermarkStatus, processWatermarkStatus1, processWatermarkStatus2, reportOrForwardLatencyMarker, setChainingStrategy, setCurrentKey, setKeyContextElement1, setKeyContextElement2, setProcessingTimeService, setup, snapshotState, snapshotState
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setKeyContextElement
close, finish, getMetricGroup, getOperatorID, initializeState, prepareSnapshotPreBarrier, setKeyContextElement1, setKeyContextElement2, snapshotState
notifyCheckpointAborted, notifyCheckpointComplete
getCurrentKey, setCurrentKey
processLatencyMarker, processWatermarkStatus
hasKeyContext
public ProcTimeMiniBatchAssignerOperator(long intervalMs)
public void open() throws Exception
AbstractStreamOperator
The default implementation does nothing.
open
in interface StreamOperator<RowData>
open
in class AbstractStreamOperator<RowData>
Exception
- An exception in this method causes the operator to fail.public void processElement(StreamRecord<RowData> element) throws Exception
Input
MultipleInputStreamOperator
.
This method is guaranteed to not be called concurrently with other methods of the operator.processElement
in interface Input<RowData>
Exception
public void onProcessingTime(long timestamp) throws Exception
ProcessingTimeService.ProcessingTimeCallback
onProcessingTime
in interface ProcessingTimeService.ProcessingTimeCallback
timestamp
- The time this callback was registered for.Exception
public void processWatermark(Watermark mark) throws Exception
AssignerWithPeriodicWatermarks
to emit watermarks from here).processWatermark
in interface Input<RowData>
processWatermark
in class AbstractStreamOperator<RowData>
Exception
Watermark
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.