@Internal public final class StreamTaskNetworkInput<T> extends AbstractStreamTaskNetworkInput<T,org.apache.flink.runtime.io.network.api.serialization.SpillingAdaptiveSpanningRecordDeserializer<org.apache.flink.runtime.plugable.DeserializationDelegate<StreamElement>>>
StreamTaskInput
that wraps an input from network taken from CheckpointedInputGate
.
This internally uses a StatusWatermarkValve
to keep track of Watermark
and
WatermarkStatus
events, and forwards them to event subscribers once the StatusWatermarkValve
determines the Watermark
from all inputs has advanced, or that a
WatermarkStatus
needs to be propagated downstream to denote a status change.
Forwarding elements, watermarks, or status elements must be protected by synchronizing on the
given lock object. This ensures that we don't call methods on a StreamInputProcessor
concurrently with the timer callback or other things.
PushingAsyncDataInput.DataOutput<T>
canEmitBatchOfRecords, checkpointedInputGate, deserializationDelegate, flattenedChannelIndices, inputIndex, inputSerializer, recordDeserializers, statusWatermarkValve
UNSPECIFIED
Constructor and Description |
---|
StreamTaskNetworkInput(CheckpointedInputGate checkpointedInputGate,
org.apache.flink.api.common.typeutils.TypeSerializer<T> inputSerializer,
org.apache.flink.runtime.io.disk.iomanager.IOManager ioManager,
StatusWatermarkValve statusWatermarkValve,
int inputIndex,
StreamTask.CanEmitBatchOfRecordsChecker canEmitBatchOfRecords) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
CompletableFuture<Void> |
prepareSnapshot(org.apache.flink.runtime.checkpoint.channel.ChannelStateWriter channelStateWriter,
long checkpointId)
Prepares to spill the in-flight input buffers as checkpoint snapshot.
|
emitNext, getActiveSerializer, getAvailableFuture, getInputIndex, processBuffer, processEvent, releaseDeserializer
public StreamTaskNetworkInput(CheckpointedInputGate checkpointedInputGate, org.apache.flink.api.common.typeutils.TypeSerializer<T> inputSerializer, org.apache.flink.runtime.io.disk.iomanager.IOManager ioManager, StatusWatermarkValve statusWatermarkValve, int inputIndex, StreamTask.CanEmitBatchOfRecordsChecker canEmitBatchOfRecords)
public CompletableFuture<Void> prepareSnapshot(org.apache.flink.runtime.checkpoint.channel.ChannelStateWriter channelStateWriter, long checkpointId) throws org.apache.flink.runtime.checkpoint.CheckpointException
StreamTaskInput
org.apache.flink.runtime.checkpoint.CheckpointException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class AbstractStreamTaskNetworkInput<T,org.apache.flink.runtime.io.network.api.serialization.SpillingAdaptiveSpanningRecordDeserializer<org.apache.flink.runtime.plugable.DeserializationDelegate<StreamElement>>>
IOException
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.