public class RemoteInputChannel extends InputChannel implements BufferRecycler, BufferListener
InputChannel.BufferAndAvailabilityBufferListener.NotificationResultchannelIndex, inputGate, numBuffersIn, numBytesIn, partitionId| Constructor and Description |
|---|
RemoteInputChannel(SingleInputGate inputGate,
int channelIndex,
ResultPartitionID partitionId,
ConnectionID connectionId,
ConnectionManager connectionManager,
int initialBackOff,
int maxBackoff,
InputChannelMetrics metrics,
org.apache.flink.core.memory.MemorySegmentProvider memorySegmentProvider) |
| 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() |
BufferListener.NotificationResult |
notifyBufferAvailable(Buffer buffer)
The Buffer pool notifies this channel of an available floating buffer.
|
void |
notifyBufferDestroyed()
Notification callback if the buffer provider is destroyed.
|
void |
onBuffer(Buffer buffer,
int sequenceNumber,
int backlog) |
void |
onEmptyBuffer(int sequenceNumber,
int backlog) |
void |
onError(Throwable cause) |
void |
onFailedPartitionRequest() |
void |
recycle(org.apache.flink.core.memory.MemorySegment segment)
Exclusive buffer is recycled to this input channel directly and it may trigger return extra
floating buffer and notify increased credit to the producer.
|
Buffer |
requestBuffer()
Requests buffer from input channel directly for receiving network data.
|
void |
requestSubpartition(int subpartitionIndex)
Requests a remote subpartition.
|
String |
toString() |
int |
unsynchronizedGetExclusiveBuffersUsed() |
int |
unsynchronizedGetFloatingBuffersAvailable() |
int |
unsynchronizedGetNumberOfQueuedBuffers() |
checkError, getCurrentBackoff, getPartitionId, increaseBackoff, notifyChannelNonEmpty, setErrorpublic RemoteInputChannel(SingleInputGate inputGate, int channelIndex, ResultPartitionID partitionId, ConnectionID connectionId, ConnectionManager connectionManager, int initialBackOff, int maxBackoff, InputChannelMetrics metrics, @Nonnull org.apache.flink.core.memory.MemorySegmentProvider memorySegmentProvider)
@VisibleForTesting
public void requestSubpartition(int subpartitionIndex)
throws IOException,
InterruptedException
IOExceptionInterruptedExceptionpublic boolean isReleased()
public void recycle(org.apache.flink.core.memory.MemorySegment segment)
recycle in interface BufferRecyclersegment - The exclusive segment of this channel.public int getNumberOfAvailableBuffers()
public int getNumberOfRequiredBuffers()
public int getSenderBacklog()
@VisibleForTesting public Buffer getNextReceivedBuffer()
public BufferListener.NotificationResult notifyBufferAvailable(Buffer buffer)
notifyBufferAvailable in interface BufferListenerbuffer - Buffer that becomes available in buffer pool.public void notifyBufferDestroyed()
BufferListenernotifyBufferDestroyed in interface BufferListenerpublic int getUnannouncedCredit()
public int getAndResetUnannouncedCredit()
public int getNumberOfQueuedBuffers()
public int unsynchronizedGetNumberOfQueuedBuffers()
unsynchronizedGetNumberOfQueuedBuffers in class InputChannelpublic 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
IOExceptionpublic void onEmptyBuffer(int sequenceNumber,
int backlog)
throws IOException
IOExceptionpublic void onFailedPartitionRequest()
public void onError(Throwable cause)
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.