public class LocalInputChannel extends InputChannel implements BufferAvailabilityListener
InputChannel.BufferAndAvailability
channelInfo, initialBackoff, inputGate, maxBackoff, numBuffersIn, numBytesIn, partitionId
Constructor and Description |
---|
LocalInputChannel(SingleInputGate inputGate,
int channelIndex,
ResultPartitionID partitionId,
ResultPartitionManager partitionManager,
TaskEventPublisher taskEventPublisher,
Counter numBytesIn,
Counter numBuffersIn) |
LocalInputChannel(SingleInputGate inputGate,
int channelIndex,
ResultPartitionID partitionId,
ResultPartitionManager partitionManager,
TaskEventPublisher taskEventPublisher,
int initialBackoff,
int maxBackoff,
Counter numBytesIn,
Counter numBuffersIn) |
Modifier and Type | Method and Description |
---|---|
void |
notifyDataAvailable()
Called whenever there might be new data available.
|
boolean |
notifyPriorityEvent(BufferConsumer eventBufferConsumer)
Allows the listener to react to a priority event before it is added to the outgoing buffer
queue.
|
protected void |
requestSubpartition(int subpartitionIndex)
Requests the queue with the specified index of the source intermediate result partition.
|
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 |
unsynchronizedGetNumberOfQueuedBuffers() |
checkError, getChannelIndex, getChannelInfo, getCurrentBackoff, getPartitionId, increaseBackoff, notifyBufferAvailable, notifyChannelNonEmpty, parseCheckpointBarrierOrNull, setError
public LocalInputChannel(SingleInputGate inputGate, int channelIndex, ResultPartitionID partitionId, ResultPartitionManager partitionManager, TaskEventPublisher taskEventPublisher, Counter numBytesIn, Counter numBuffersIn)
public LocalInputChannel(SingleInputGate inputGate, int channelIndex, ResultPartitionID partitionId, ResultPartitionManager partitionManager, TaskEventPublisher taskEventPublisher, int initialBackoff, int maxBackoff, Counter numBytesIn, Counter numBuffersIn)
protected void requestSubpartition(int subpartitionIndex) throws IOException
InputChannel
The queue index to request depends on which sub task the channel belongs to and is specified by the consumer of this channel.
IOException
public void spillInflightBuffers(long checkpointId, ChannelStateWriter channelStateWriter)
spillInflightBuffers
in class InputChannel
public void notifyDataAvailable()
BufferAvailabilityListener
notifyDataAvailable
in interface BufferAvailabilityListener
public void resumeConsumption()
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
public int unsynchronizedGetNumberOfQueuedBuffers()
unsynchronizedGetNumberOfQueuedBuffers
in class InputChannel
public boolean notifyPriorityEvent(BufferConsumer eventBufferConsumer) throws IOException
BufferAvailabilityListener
notifyPriorityEvent
in interface BufferAvailabilityListener
IOException
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.