Class StreamOperatorWrapper<OUT,OP extends StreamOperator<OUT>>
- java.lang.Object
-
- org.apache.flink.streaming.runtime.tasks.StreamOperatorWrapper<OUT,OP>
-
@Internal public class StreamOperatorWrapper<OUT,OP extends StreamOperator<OUT>> extends Object
This class handles the finish, endInput and other related logic of aStreamOperator
. It also automatically propagates the finish operation to the next wrapper that thenext
points to, so we can usenext
to link all operator wrappers in the operator chain and finish all operators only by calling thefinish(StreamTaskActionExecutor, StopMode)
method of the header operator wrapper.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Close the operator.void
endOperatorInput(int inputId)
Ends an input of the operator contained by this wrapper.void
finish(StreamTaskActionExecutor actionExecutor, StopMode stopMode)
Finishes the wrapped operator and propagates the finish operation to the next wrapper that thenext
points to.OP
getStreamOperator()
boolean
isClosed()
Checks if the wrapped operator has been closed.void
notifyCheckpointComplete(long checkpointId)
void
notifyCheckpointSubsumed(long checkpointId)
-
-
-
Method Detail
-
isClosed
public boolean isClosed()
Checks if the wrapped operator has been closed.Note that this method must be called in the task thread.
-
endOperatorInput
public void endOperatorInput(int inputId) throws Exception
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
public void notifyCheckpointComplete(long checkpointId) throws Exception
- Throws:
Exception
-
notifyCheckpointSubsumed
public void notifyCheckpointSubsumed(long checkpointId) throws Exception
- Throws:
Exception
-
getStreamOperator
public OP getStreamOperator()
-
finish
public void finish(StreamTaskActionExecutor actionExecutor, StopMode stopMode) throws Exception
Finishes the wrapped operator and propagates the finish operation to the next wrapper that thenext
points 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
-
-