@Internal public final class RescalingStreamTaskNetworkInput<T> extends AbstractStreamTaskNetworkInput<T,org.apache.flink.streaming.runtime.io.recovery.DemultiplexingRecordDeserializer<T>> implements RecoverableStreamTaskInput<T>
StreamTaskNetworkInput implementation that demultiplexes virtual channels.
The demultiplexing works in two dimensions for the following cases. *
In both cases, records from multiple old channels are received over one new physical channel, which need to demultiplex the record to correctly restore spanning records (similar to how StreamTaskNetworkInput works).
Note that when both cases occur at the same time (downscaling of several operators), there is the cross product of channels. So if two subtasks are collapsed and two channels overlap from the output side, there is a total of 4 virtual channels.
PushingAsyncDataInput.DataOutput<T>checkpointedInputGate, deserializationDelegate, flattenedChannelIndices, inputIndex, inputSerializer, recordDeserializers, statusWatermarkValveUNSPECIFIED| 构造器和说明 |
|---|
RescalingStreamTaskNetworkInput(CheckpointedInputGate checkpointedInputGate,
org.apache.flink.api.common.typeutils.TypeSerializer<T> inputSerializer,
org.apache.flink.runtime.io.disk.iomanager.IOManager ioManager,
StatusWatermarkValve statusWatermarkValve,
int inputIndex,
org.apache.flink.runtime.checkpoint.InflightDataRescalingDescriptor inflightDataRescalingDescriptor,
java.util.function.Function<Integer,StreamPartitioner<?>> gatePartitioners,
org.apache.flink.api.common.TaskInfo taskInfo) |
| 限定符和类型 | 方法和说明 |
|---|---|
StreamTaskInput<T> |
finishRecovery() |
protected org.apache.flink.streaming.runtime.io.recovery.DemultiplexingRecordDeserializer<T> |
getActiveSerializer(org.apache.flink.runtime.checkpoint.channel.InputChannelInfo channelInfo) |
CompletableFuture<Void> |
prepareSnapshot(org.apache.flink.runtime.checkpoint.channel.ChannelStateWriter channelStateWriter,
long checkpointId)
Prepares to spill the in-flight input buffers as checkpoint snapshot.
|
protected DataInputStatus |
processEvent(org.apache.flink.runtime.io.network.partition.consumer.BufferOrEvent bufferOrEvent) |
close, emitNext, getAvailableFuture, getInputIndex, processBuffer, releaseDeserializerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetInputIndexemitNextpublic RescalingStreamTaskNetworkInput(CheckpointedInputGate checkpointedInputGate, org.apache.flink.api.common.typeutils.TypeSerializer<T> inputSerializer, org.apache.flink.runtime.io.disk.iomanager.IOManager ioManager, StatusWatermarkValve statusWatermarkValve, int inputIndex, org.apache.flink.runtime.checkpoint.InflightDataRescalingDescriptor inflightDataRescalingDescriptor, java.util.function.Function<Integer,StreamPartitioner<?>> gatePartitioners, org.apache.flink.api.common.TaskInfo taskInfo)
public StreamTaskInput<T> finishRecovery() throws IOException
finishRecovery 在接口中 RecoverableStreamTaskInput<T>IOExceptionprotected org.apache.flink.streaming.runtime.io.recovery.DemultiplexingRecordDeserializer<T> getActiveSerializer(org.apache.flink.runtime.checkpoint.channel.InputChannelInfo channelInfo)
getActiveSerializer 在类中 AbstractStreamTaskNetworkInput<T,org.apache.flink.streaming.runtime.io.recovery.DemultiplexingRecordDeserializer<T>>protected DataInputStatus processEvent(org.apache.flink.runtime.io.network.partition.consumer.BufferOrEvent bufferOrEvent)
processEvent 在类中 AbstractStreamTaskNetworkInput<T,org.apache.flink.streaming.runtime.io.recovery.DemultiplexingRecordDeserializer<T>>public CompletableFuture<Void> prepareSnapshot(org.apache.flink.runtime.checkpoint.channel.ChannelStateWriter channelStateWriter, long checkpointId) throws org.apache.flink.runtime.checkpoint.CheckpointException
StreamTaskInputprepareSnapshot 在接口中 StreamTaskInput<T>org.apache.flink.runtime.checkpoint.CheckpointExceptionCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.