public abstract class RecoveredInputChannel extends InputChannel implements ChannelStateHolder
InputChannel.BufferAndAvailability| Modifier and Type | Field and Description |
|---|---|
protected BufferManager |
bufferManager |
protected ChannelStateWriter |
channelStateWriter |
protected int |
networkBuffersPerChannel |
channelInfo, initialBackoff, inputGate, maxBackoff, numBuffersIn, numBytesIn, partitionId| Modifier and Type | Method and Description |
|---|---|
void |
acknowledgeAllRecordsProcessed()
When received
EndOfData from one channel, it need to acknowledge after this event get
processed. |
void |
checkpointStarted(CheckpointBarrier barrier)
Called by task thread when checkpointing is started (e.g., any input channel received
barrier).
|
void |
checkpointStopped(long checkpointId)
Called by task thread on cancel/complete to clean-up temporary data.
|
void |
finishReadRecoveredState() |
protected int |
getNumberOfQueuedBuffers() |
void |
onRecoveredStateBuffer(Buffer buffer) |
Buffer |
requestBufferBlocking() |
void |
resumeConsumption()
After sending a
CheckpointBarrier of
exactly-once mode, the upstream will be blocked and become unavailable. |
void |
setChannelStateWriter(ChannelStateWriter channelStateWriter)
Injects the
ChannelStateWriter. |
InputChannel |
toInputChannel() |
protected abstract InputChannel |
toInputChannelInternal() |
checkError, convertToPriorityEvent, getChannelIndex, getChannelInfo, getCurrentBackoff, getPartitionId, increaseBackoff, notifyBufferAvailable, notifyChannelNonEmpty, notifyPriorityEvent, setError, unsynchronizedGetNumberOfQueuedBuffersprotected final BufferManager bufferManager
protected ChannelStateWriter channelStateWriter
protected final int networkBuffersPerChannel
public void setChannelStateWriter(ChannelStateWriter channelStateWriter)
ChannelStateHolderChannelStateWriter. Must only be called once.setChannelStateWriter in interface ChannelStateHolderpublic final InputChannel toInputChannel() throws IOException
IOExceptionpublic void checkpointStopped(long checkpointId)
InputChannelcheckpointStopped in class InputChannelprotected abstract InputChannel toInputChannelInternal() throws IOException
IOExceptionpublic void onRecoveredStateBuffer(Buffer buffer)
public void finishReadRecoveredState()
throws IOException
IOExceptionpublic void resumeConsumption()
InputChannelCheckpointBarrier of
exactly-once mode, the upstream will be blocked and become unavailable. This method tries to
unblock the corresponding upstream and resume data consumption.resumeConsumption in class InputChannelpublic void acknowledgeAllRecordsProcessed()
throws IOException
InputChannelEndOfData from one channel, it need to acknowledge after this event get
processed.acknowledgeAllRecordsProcessed in class InputChannelIOException@VisibleForTesting protected int getNumberOfQueuedBuffers()
public Buffer requestBufferBlocking() throws InterruptedException, IOException
InterruptedExceptionIOExceptionpublic void checkpointStarted(CheckpointBarrier barrier) throws CheckpointException
InputChannelcheckpointStarted in class InputChannelCheckpointExceptionCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.