Class FinishedOperatorChain<OUT,OP extends StreamOperator<OUT>>
java.lang.Object
org.apache.flink.streaming.runtime.tasks.OperatorChain<OUT,OP>
org.apache.flink.streaming.runtime.tasks.FinishedOperatorChain<OUT,OP>
- All Implemented Interfaces:
Closeable,AutoCloseable,BoundedMultiInput
@Internal
public class FinishedOperatorChain<OUT,OP extends StreamOperator<OUT>>
extends OperatorChain<OUT,OP>
The
OperatorChain that is used for restoring tasks that are TaskStateManager.isTaskDeployedAsFinished().-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.flink.streaming.runtime.tasks.OperatorChain
OperatorChain.ChainedSource -
Field Summary
Fields inherited from class org.apache.flink.streaming.runtime.tasks.OperatorChain
chainedSources, closer, finishedOnRestoreInput, firstOperatorWrapper, isClosed, mainOperatorOutput, mainOperatorWrapper, numOperators, operatorEventDispatcher, streamOutputs, tailOperatorWrapper -
Constructor Summary
ConstructorsConstructorDescriptionFinishedOperatorChain(StreamTask<OUT, OP> containingTask, RecordWriterDelegate<SerializationDelegate<StreamRecord<OUT>>> recordWriterDelegate) -
Method Summary
Modifier and TypeMethodDescriptionvoiddispatchOperatorEvent(OperatorID operator, org.apache.flink.util.SerializedValue<OperatorEvent> event) voidendInput(int inputId) Ends the main operator input specified byinputId).voidfinishOperators(StreamTaskActionExecutor actionExecutor, StopMode stopMode) Closes all operators in a chain effect way.voidinitializeStateAndOpenOperators(StreamTaskStateInitializer streamTaskStateInitializer) Initialize state and open all operators in the chain from tail to heads, contrary toStreamOperator.close()which happens heads to tail (seeOperatorChain.finishOperators(StreamTaskActionExecutor, StopMode)).booleanisClosed()booleanvoidnotifyCheckpointAborted(long checkpointId) voidnotifyCheckpointComplete(long checkpointId) voidnotifyCheckpointSubsumed(long checkpointId) voidprepareSnapshotPreBarrier(long checkpointId) voidsnapshotState(Map<OperatorID, OperatorSnapshotFutures> operatorSnapshotsInProgress, CheckpointMetaData checkpointMetaData, CheckpointOptions checkpointOptions, Supplier<Boolean> isRunning, ChannelStateWriter.ChannelStateWriteResult channelStateWriteResult, CheckpointStreamFactory storage) Methods inherited from class org.apache.flink.streaming.runtime.tasks.OperatorChain
abortCheckpoint, alignedBarrierTimeout, broadcastEvent, broadcastEvent, close, closeAllOperators, flushOutputs, getAllOperators, getAllOperators, getChainedSource, getChainedSourceOutputs, getFinishedOnRestoreInputOrDefault, getMainOperator, getNumberOfOperators, getOperatorEventDispatcher, getSourceTaskInput, getSourceTaskInputs, getStreamOutputs, getTailOperator, sendAcknowledgeCheckpointEvent, snapshotChannelStates
-
Constructor Details
-
FinishedOperatorChain
public FinishedOperatorChain(StreamTask<OUT, OP> containingTask, RecordWriterDelegate<SerializationDelegate<StreamRecord<OUT>>> recordWriterDelegate)
-
-
Method Details
-
isTaskDeployedAsFinished
public boolean isTaskDeployedAsFinished()- Specified by:
isTaskDeployedAsFinishedin classOperatorChain<OUT,OP extends StreamOperator<OUT>>
-
getMainOperatorOutput
- Overrides:
getMainOperatorOutputin classOperatorChain<OUT,OP extends StreamOperator<OUT>>
-
dispatchOperatorEvent
public void dispatchOperatorEvent(OperatorID operator, org.apache.flink.util.SerializedValue<OperatorEvent> event) - Specified by:
dispatchOperatorEventin classOperatorChain<OUT,OP extends StreamOperator<OUT>>
-
prepareSnapshotPreBarrier
public void prepareSnapshotPreBarrier(long checkpointId) - Specified by:
prepareSnapshotPreBarrierin classOperatorChain<OUT,OP extends StreamOperator<OUT>>
-
endInput
Description copied from class:OperatorChainEnds the main operator input specified byinputId).- Specified by:
endInputin interfaceBoundedMultiInput- Specified by:
endInputin classOperatorChain<OUT,OP extends StreamOperator<OUT>> - Parameters:
inputId- the input ID starts from 1 which indicates the first input.- Throws:
Exception
-
initializeStateAndOpenOperators
Description copied from class:OperatorChainInitialize state and open all operators in the chain from tail to heads, contrary toStreamOperator.close()which happens heads to tail (seeOperatorChain.finishOperators(StreamTaskActionExecutor, StopMode)).- Specified by:
initializeStateAndOpenOperatorsin classOperatorChain<OUT,OP extends StreamOperator<OUT>>
-
finishOperators
public void finishOperators(StreamTaskActionExecutor actionExecutor, StopMode stopMode) throws Exception Description copied from class:OperatorChainCloses all operators in a chain effect way. Closing happens from heads to tail operator in the chain, contrary toStreamOperator.open()which happens tail to heads (seeOperatorChain.initializeStateAndOpenOperators(StreamTaskStateInitializer)).- Specified by:
finishOperatorsin classOperatorChain<OUT,OP extends StreamOperator<OUT>> - Throws:
Exception
-
notifyCheckpointComplete
- Specified by:
notifyCheckpointCompletein classOperatorChain<OUT,OP extends StreamOperator<OUT>> - Throws:
Exception
-
notifyCheckpointAborted
- Specified by:
notifyCheckpointAbortedin classOperatorChain<OUT,OP extends StreamOperator<OUT>> - Throws:
Exception
-
notifyCheckpointSubsumed
- Specified by:
notifyCheckpointSubsumedin classOperatorChain<OUT,OP extends StreamOperator<OUT>> - Throws:
Exception
-
isClosed
public boolean isClosed()- Overrides:
isClosedin classOperatorChain<OUT,OP extends StreamOperator<OUT>>
-
snapshotState
public void snapshotState(Map<OperatorID, OperatorSnapshotFutures> operatorSnapshotsInProgress, CheckpointMetaData checkpointMetaData, CheckpointOptions checkpointOptions, Supplier<Boolean> isRunning, ChannelStateWriter.ChannelStateWriteResult channelStateWriteResult, CheckpointStreamFactory storage) throws Exception- Specified by:
snapshotStatein classOperatorChain<OUT,OP extends StreamOperator<OUT>> - Throws:
Exception
-