Class StreamOperatorWrapper<OUT,OP extends StreamOperator<OUT>>
java.lang.Object
org.apache.flink.streaming.runtime.tasks.StreamOperatorWrapper<OUT,OP>
This class handles the finish, endInput and other related logic of a
StreamOperator. It
also automatically propagates the finish operation to the next wrapper that the next
points to, so we can use next to link all operator wrappers in the operator chain and
finish all operators only by calling the finish(StreamTaskActionExecutor, StopMode)
method of the header operator wrapper.-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the operator.voidendOperatorInput(int inputId) Ends an input of the operator contained by this wrapper.voidfinish(StreamTaskActionExecutor actionExecutor, StopMode stopMode) Finishes the wrapped operator and propagates the finish operation to the next wrapper that thenextpoints to.booleanisClosed()Checks if the wrapped operator has been closed.voidnotifyCheckpointComplete(long checkpointId) voidnotifyCheckpointSubsumed(long checkpointId)
-
Method Details
-
isClosed
public boolean isClosed()Checks if the wrapped operator has been closed.Note that this method must be called in the task thread.
-
endOperatorInput
Ends an input of the operator contained by this wrapper.- Parameters:
inputId- the input ID starts from 1 which indicates the first input.- Throws:
Exception
-
notifyCheckpointComplete
- Throws:
Exception
-
notifyCheckpointSubsumed
- Throws:
Exception
-
getStreamOperator
-
finish
Finishes the wrapped operator and propagates the finish operation to the next wrapper that thenextpoints to.Note that this method must be called in the task thread, because we need to call
MailboxExecutor.yield()to take the mails of closing operator and running timers and run them.- Throws:
Exception
-
close
Close the operator.- Throws:
Exception
-