public class RemoteInputChannel extends InputChannel
InputChannel.BufferAndAvailability
channelInfo, initialBackoff, inputGate, maxBackoff, numBuffersIn, numBytesIn, partitionId
Constructor and Description |
---|
RemoteInputChannel(SingleInputGate inputGate,
int channelIndex,
ResultPartitionID partitionId,
ConnectionID connectionId,
ConnectionManager connectionManager,
int initialBackOff,
int maxBackoff,
Counter numBytesIn,
Counter numBuffersIn) |
Modifier and Type | Method and Description |
---|---|
int |
getAndResetUnannouncedCredit()
Gets the unannounced credit and resets it to 0 atomically.
|
BufferProvider |
getBufferProvider() |
int |
getInitialCredit() |
InputChannelID |
getInputChannelId() |
Buffer |
getNextReceivedBuffer() |
int |
getNumberOfAvailableBuffers() |
int |
getNumberOfQueuedBuffers()
Gets the current number of received buffers which have not been processed yet.
|
int |
getNumberOfRequiredBuffers() |
int |
getSenderBacklog() |
int |
getUnannouncedCredit()
Gets the currently unannounced credit.
|
boolean |
isReleased() |
void |
notifyBufferAvailable(int numAvailableBuffers)
The unannounced credit is increased by the given amount and might notify increased credit to
the producer.
|
void |
onBuffer(Buffer buffer,
int sequenceNumber,
int backlog) |
void |
onEmptyBuffer(int sequenceNumber,
int backlog) |
void |
onError(Throwable cause) |
void |
onFailedPartitionRequest() |
Buffer |
requestBuffer()
Requests buffer from input channel directly for receiving network data.
|
void |
requestSubpartition(int subpartitionIndex)
Requests a remote subpartition.
|
void |
resumeConsumption()
After sending a
CheckpointBarrier of
exactly-once mode, the upstream will be blocked and become unavailable. |
void |
spillInflightBuffers(long checkpointId,
ChannelStateWriter channelStateWriter) |
String |
toString() |
int |
unsynchronizedGetExclusiveBuffersUsed() |
int |
unsynchronizedGetFloatingBuffersAvailable() |
int |
unsynchronizedGetNumberOfQueuedBuffers() |
checkError, getChannelIndex, getChannelInfo, getCurrentBackoff, getPartitionId, increaseBackoff, notifyChannelNonEmpty, parseCheckpointBarrierOrNull, setError
public RemoteInputChannel(SingleInputGate inputGate, int channelIndex, ResultPartitionID partitionId, ConnectionID connectionId, ConnectionManager connectionManager, int initialBackOff, int maxBackoff, Counter numBytesIn, Counter numBuffersIn)
@VisibleForTesting public void requestSubpartition(int subpartitionIndex) throws IOException, InterruptedException
IOException
InterruptedException
public void spillInflightBuffers(long checkpointId, ChannelStateWriter channelStateWriter) throws IOException
spillInflightBuffers
in class InputChannel
IOException
public boolean isReleased()
@VisibleForTesting public int getNumberOfAvailableBuffers()
@VisibleForTesting public int getNumberOfRequiredBuffers()
@VisibleForTesting public int getSenderBacklog()
@VisibleForTesting public Buffer getNextReceivedBuffer()
public void notifyBufferAvailable(int numAvailableBuffers) throws IOException
notifyBufferAvailable
in class InputChannel
IOException
public void resumeConsumption() throws IOException
InputChannel
CheckpointBarrier
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 InputChannel
IOException
public int getUnannouncedCredit()
public int getAndResetUnannouncedCredit()
public int getNumberOfQueuedBuffers()
public int unsynchronizedGetNumberOfQueuedBuffers()
unsynchronizedGetNumberOfQueuedBuffers
in class InputChannel
public int unsynchronizedGetExclusiveBuffersUsed()
public int unsynchronizedGetFloatingBuffersAvailable()
public InputChannelID getInputChannelId()
public int getInitialCredit()
public BufferProvider getBufferProvider() throws IOException
IOException
@Nullable public Buffer requestBuffer()
public void onBuffer(Buffer buffer, int sequenceNumber, int backlog) throws IOException
IOException
public void onEmptyBuffer(int sequenceNumber, int backlog) throws IOException
IOException
public void onFailedPartitionRequest()
public void onError(Throwable cause)
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.