@Internal public final class StreamTaskNetworkInput<T> extends AbstractStreamTaskNetworkInput<T,SpillingAdaptiveSpanningRecordDeserializer<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>
AvailabilityProvider.AvailabilityHelper
checkpointedInputGate, deserializationDelegate, flattenedChannelIndices, inputIndex, inputSerializer, recordDeserializers, statusWatermarkValve
UNSPECIFIED
AVAILABLE
Constructor and Description |
---|
StreamTaskNetworkInput(CheckpointedInputGate checkpointedInputGate,
TypeSerializer<T> inputSerializer,
IOManager ioManager,
StatusWatermarkValve statusWatermarkValve,
int inputIndex) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
CompletableFuture<Void> |
prepareSnapshot(ChannelStateWriter channelStateWriter,
long checkpointId)
Prepares to spill the in-flight input buffers as checkpoint snapshot.
|
emitNext, getActiveSerializer, getAvailableFuture, getInputIndex, processBuffer, processEvent, releaseDeserializer
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
and, isApproximatelyAvailable, isAvailable, or
public StreamTaskNetworkInput(CheckpointedInputGate checkpointedInputGate, TypeSerializer<T> inputSerializer, IOManager ioManager, StatusWatermarkValve statusWatermarkValve, int inputIndex)
public CompletableFuture<Void> prepareSnapshot(ChannelStateWriter channelStateWriter, long checkpointId) throws CheckpointException
StreamTaskInput
CheckpointException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class AbstractStreamTaskNetworkInput<T,SpillingAdaptiveSpanningRecordDeserializer<DeserializationDelegate<StreamElement>>>
IOException
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.