OUT - The type of elements accepted by the chain, i.e., the input type of the chain's
head operator.@Internal public class OperatorChain<OUT,OP extends StreamOperator<OUT>> extends Object implements StreamStatusMaintainer
OperatorChain contains all operators that are executed as one chain within a single
StreamTask.| Modifier and Type | Class and Description |
|---|---|
static interface |
OperatorChain.WatermarkGaugeExposingOutput<T>
An
Output that measures the last emitted watermark with a WatermarkGauge. |
| Constructor and Description |
|---|
OperatorChain(StreamTask<OUT,OP> containingTask,
org.apache.flink.runtime.io.network.api.writer.RecordWriterDelegate<org.apache.flink.runtime.plugable.SerializationDelegate<StreamRecord<OUT>>> recordWriterDelegate) |
| Modifier and Type | Method and Description |
|---|---|
void |
broadcastCheckpointBarrier(long id,
long timestamp,
org.apache.flink.runtime.checkpoint.CheckpointOptions checkpointOptions) |
void |
broadcastCheckpointCancelMarker(long id) |
void |
endHeadOperatorInput(int inputId)
Ends the head operator input specified by
inputId). |
void |
endNonHeadOperatorInput(StreamOperator<?> streamOperator)
Ends all inputs of the non-head operator specified by
streamOperator)
(now there is only one input for each non-head operator). |
void |
flushOutputs()
This method should be called before finishing the record emission, to make sure any data
that is still buffered will be sent.
|
StreamOperator<?>[] |
getAllOperators() |
OperatorChain.WatermarkGaugeExposingOutput<StreamRecord<OUT>> |
getChainEntryPoint() |
int |
getChainLength() |
OP |
getHeadOperator() |
RecordWriterOutput<?>[] |
getStreamOutputs() |
StreamStatus |
getStreamStatus()
Returns the current stream status.
|
boolean |
hasSelectiveReadingOperator() |
void |
prepareSnapshotPreBarrier(long checkpointId) |
void |
releaseOutputs()
This method releases all resources of the record writer output.
|
void |
toggleStreamStatus(StreamStatus status)
Toggles the current stream status.
|
public OperatorChain(StreamTask<OUT,OP> containingTask, org.apache.flink.runtime.io.network.api.writer.RecordWriterDelegate<org.apache.flink.runtime.plugable.SerializationDelegate<StreamRecord<OUT>>> recordWriterDelegate)
public StreamStatus getStreamStatus()
StreamStatusProvidergetStreamStatus in interface StreamStatusProviderpublic void toggleStreamStatus(StreamStatus status)
StreamStatusMaintainertoggleStreamStatus in interface StreamStatusMaintainerstatus - the new status to toggle topublic void broadcastCheckpointBarrier(long id,
long timestamp,
org.apache.flink.runtime.checkpoint.CheckpointOptions checkpointOptions)
throws IOException
IOExceptionpublic void broadcastCheckpointCancelMarker(long id)
throws IOException
IOExceptionpublic void prepareSnapshotPreBarrier(long checkpointId)
throws Exception
Exceptionpublic void endHeadOperatorInput(int inputId)
throws Exception
inputId).inputId - the input ID starts from 1 which indicates the first input.Exceptionpublic void endNonHeadOperatorInput(StreamOperator<?> streamOperator) throws Exception
streamOperator)
(now there is only one input for each non-head operator).streamOperator - non-head operator for ending the only input.Exceptionpublic RecordWriterOutput<?>[] getStreamOutputs()
public StreamOperator<?>[] getAllOperators()
public OperatorChain.WatermarkGaugeExposingOutput<StreamRecord<OUT>> getChainEntryPoint()
public void flushOutputs()
throws IOException
IOException - Thrown, if the buffered data cannot be pushed into the output streams.public void releaseOutputs()
This method should never fail.
public OP getHeadOperator()
public int getChainLength()
public boolean hasSelectiveReadingOperator()
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.