public abstract class AbstractPerRoundWrapperOperator<T,S extends org.apache.flink.streaming.api.operators.StreamOperator<T>> extends AbstractWrapperOperator<T> implements org.apache.flink.streaming.api.operators.StreamOperatorStateHandler.CheckpointedStreamOperator
Modifier and Type | Field and Description |
---|---|
protected org.apache.flink.streaming.util.LatencyStats |
latencyStats |
containingTask, epochWatermarkSupplier, epochWatermarkTracker, eventBroadcastOutput, iterationContext, metrics, operatorFactory, output, parameters, proxyOutput, streamConfig, uniqueSenderId
Constructor and Description |
---|
AbstractPerRoundWrapperOperator(org.apache.flink.streaming.api.operators.StreamOperatorParameters<IterationRecord<T>> parameters,
org.apache.flink.streaming.api.operators.StreamOperatorFactory<T> operatorFactory) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected void |
closeStreamOperator(S operator,
int epoch,
int epochWatermark) |
protected abstract void |
endInputAndEmitMaxWatermark(S operator,
int epoch,
int epochWatermark) |
void |
finish() |
Object |
getCurrentKey() |
org.apache.flink.metrics.groups.OperatorMetricGroup |
getMetricGroup() |
org.apache.flink.runtime.jobgraph.OperatorID |
getOperatorID() |
protected S |
getWrappedOperator(int round) |
Map<Integer,S> |
getWrappedOperators() |
void |
initializeState(org.apache.flink.runtime.state.StateInitializationContext context) |
void |
initializeState(org.apache.flink.streaming.api.operators.StreamTaskStateInitializer streamTaskStateManager) |
protected boolean |
isUsingCustomRawKeyedState() |
void |
notifyCheckpointAborted(long checkpointId) |
void |
notifyCheckpointComplete(long l) |
void |
onEpochWatermarkIncrement(int epochWatermark)
Notifies a new round is aligned to a new epoch watermark.
|
void |
open() |
void |
prepareSnapshotPreBarrier(long checkpointId) |
protected void |
processForEachWrappedOperator(org.apache.flink.util.function.BiConsumerWithException<Integer,S,Exception> consumer) |
protected void |
reportOrForwardLatencyMarker(org.apache.flink.streaming.runtime.streamrecord.LatencyMarker marker) |
void |
setCurrentKey(Object key) |
void |
setKeyContextElement1(org.apache.flink.streaming.runtime.streamrecord.StreamRecord record) |
void |
setKeyContextElement2(org.apache.flink.streaming.runtime.streamrecord.StreamRecord record) |
org.apache.flink.streaming.api.operators.OperatorSnapshotFutures |
snapshotState(long checkpointId,
long timestamp,
org.apache.flink.runtime.checkpoint.CheckpointOptions checkpointOptions,
org.apache.flink.runtime.state.CheckpointStreamFactory factory) |
void |
snapshotState(org.apache.flink.runtime.state.StateSnapshotContext context) |
clearIterationContextRound, endInput, notifyEpochWatermarkIncrement, onEpochWatermarkEvent, setIterationContextRound
public AbstractPerRoundWrapperOperator(org.apache.flink.streaming.api.operators.StreamOperatorParameters<IterationRecord<T>> parameters, org.apache.flink.streaming.api.operators.StreamOperatorFactory<T> operatorFactory)
protected S getWrappedOperator(int round)
protected abstract void endInputAndEmitMaxWatermark(S operator, int epoch, int epochWatermark) throws Exception
Exception
protected void closeStreamOperator(S operator, int epoch, int epochWatermark) throws Exception
Exception
public void onEpochWatermarkIncrement(int epochWatermark) throws IOException
OperatorEpochWatermarkTrackerListener
onEpochWatermarkIncrement
in interface OperatorEpochWatermarkTrackerListener
onEpochWatermarkIncrement
in class AbstractWrapperOperator<T>
epochWatermark
- The new epoch watermark.IOException
protected void processForEachWrappedOperator(org.apache.flink.util.function.BiConsumerWithException<Integer,S,Exception> consumer) throws Exception
Exception
public void open() throws Exception
open
in interface org.apache.flink.streaming.api.operators.StreamOperator<IterationRecord<T>>
Exception
public void initializeState(org.apache.flink.streaming.api.operators.StreamTaskStateInitializer streamTaskStateManager) throws Exception
initializeState
in interface org.apache.flink.streaming.api.operators.StreamOperator<IterationRecord<T>>
Exception
public void initializeState(org.apache.flink.runtime.state.StateInitializationContext context) throws Exception
initializeState
in interface org.apache.flink.streaming.api.operators.StreamOperatorStateHandler.CheckpointedStreamOperator
Exception
@Internal protected boolean isUsingCustomRawKeyedState()
public void finish() throws Exception
finish
in interface org.apache.flink.streaming.api.operators.StreamOperator<IterationRecord<T>>
Exception
public void close() throws Exception
close
in interface org.apache.flink.streaming.api.operators.StreamOperator<IterationRecord<T>>
Exception
public void prepareSnapshotPreBarrier(long checkpointId) throws Exception
prepareSnapshotPreBarrier
in interface org.apache.flink.streaming.api.operators.StreamOperator<IterationRecord<T>>
Exception
public org.apache.flink.streaming.api.operators.OperatorSnapshotFutures snapshotState(long checkpointId, long timestamp, org.apache.flink.runtime.checkpoint.CheckpointOptions checkpointOptions, org.apache.flink.runtime.state.CheckpointStreamFactory factory) throws Exception
snapshotState
in interface org.apache.flink.streaming.api.operators.StreamOperator<IterationRecord<T>>
Exception
public void snapshotState(org.apache.flink.runtime.state.StateSnapshotContext context) throws Exception
snapshotState
in interface org.apache.flink.streaming.api.operators.StreamOperatorStateHandler.CheckpointedStreamOperator
Exception
public void setKeyContextElement1(org.apache.flink.streaming.runtime.streamrecord.StreamRecord record) throws Exception
setKeyContextElement1
in interface org.apache.flink.streaming.api.operators.StreamOperator<IterationRecord<T>>
Exception
public void setKeyContextElement2(org.apache.flink.streaming.runtime.streamrecord.StreamRecord record) throws Exception
setKeyContextElement2
in interface org.apache.flink.streaming.api.operators.StreamOperator<IterationRecord<T>>
Exception
public org.apache.flink.metrics.groups.OperatorMetricGroup getMetricGroup()
getMetricGroup
in interface org.apache.flink.streaming.api.operators.StreamOperator<IterationRecord<T>>
public org.apache.flink.runtime.jobgraph.OperatorID getOperatorID()
getOperatorID
in interface org.apache.flink.streaming.api.operators.StreamOperator<IterationRecord<T>>
public void notifyCheckpointComplete(long l) throws Exception
notifyCheckpointComplete
in interface org.apache.flink.api.common.state.CheckpointListener
Exception
public void notifyCheckpointAborted(long checkpointId) throws Exception
notifyCheckpointAborted
in interface org.apache.flink.api.common.state.CheckpointListener
Exception
public void setCurrentKey(Object key)
setCurrentKey
in interface org.apache.flink.streaming.api.operators.KeyContext
public Object getCurrentKey()
getCurrentKey
in interface org.apache.flink.streaming.api.operators.KeyContext
protected void reportOrForwardLatencyMarker(org.apache.flink.streaming.runtime.streamrecord.LatencyMarker marker)
Copyright © 2019–2023 The Apache Software Foundation. All rights reserved.