public class NettyPartitionRequestClient extends Object implements PartitionRequestClient
This client is shared by all remote input channels, which request a partition from the same
ConnectionID
.
Modifier and Type | Method and Description |
---|---|
void |
acknowledgeAllRecordsProcessed(RemoteInputChannel inputChannel)
Acknowledges all user records are processed for this channel.
|
void |
close(RemoteInputChannel inputChannel)
Cancels the partition request for the given remote input channel and removes this client from
factory if it is not referenced by any other input channels.
|
void |
closeConnection() |
void |
notifyCreditAvailable(RemoteInputChannel inputChannel)
Notifies available credits from one remote input channel.
|
void |
notifyNewBufferSize(RemoteInputChannel inputChannel,
int bufferSize)
Notifies new buffer size from one remote input channel.
|
void |
notifyRequiredSegmentId(RemoteInputChannel inputChannel,
int subpartitionIndex,
int segmentId)
Notifies the id of segment required from one remote input channel.
|
void |
requestSubpartition(ResultPartitionID partitionId,
ResultSubpartitionIndexSet subpartitionIndexSet,
RemoteInputChannel inputChannel,
int delayMs)
Requests a remote intermediate result partition queue.
|
void |
resumeConsumption(RemoteInputChannel inputChannel)
Requests to resume data consumption from one remote input channel.
|
void |
sendTaskEvent(ResultPartitionID partitionId,
TaskEvent event,
RemoteInputChannel inputChannel)
Sends a task event backwards to an intermediate result partition producer.
|
public void requestSubpartition(ResultPartitionID partitionId, ResultSubpartitionIndexSet subpartitionIndexSet, RemoteInputChannel inputChannel, int delayMs) throws IOException
The request goes to the remote producer, for which this partition request client instance has been created.
requestSubpartition
in interface PartitionRequestClient
partitionId
- The identifier of result partition to be requested.subpartitionIndexSet
- The sub partition index range in the requested result partition.inputChannel
- The remote input channel for requesting the sub partition.delayMs
- The request is scheduled within a delay time.IOException
public void sendTaskEvent(ResultPartitionID partitionId, TaskEvent event, RemoteInputChannel inputChannel) throws IOException
Backwards task events flow between readers and writers and therefore will only work when both are running at the same time, which is only guaranteed to be the case when both the respective producer and consumer task run pipelined.
sendTaskEvent
in interface PartitionRequestClient
partitionId
- The identifier of result partition.event
- The task event to be sent.inputChannel
- The remote input channel for sending this event.IOException
public void notifyCreditAvailable(RemoteInputChannel inputChannel)
PartitionRequestClient
notifyCreditAvailable
in interface PartitionRequestClient
inputChannel
- The remote input channel who announces the available credits.public void notifyNewBufferSize(RemoteInputChannel inputChannel, int bufferSize)
PartitionRequestClient
notifyNewBufferSize
in interface PartitionRequestClient
inputChannel
- The remote input channel who announces the new buffer size.bufferSize
- The new buffer size.public void notifyRequiredSegmentId(RemoteInputChannel inputChannel, int subpartitionIndex, int segmentId)
PartitionRequestClient
notifyRequiredSegmentId
in interface PartitionRequestClient
inputChannel
- The remote input channel who requires segment.subpartitionIndex
- The id of the corresponding subpartition.segmentId
- The id of segment.public void resumeConsumption(RemoteInputChannel inputChannel)
PartitionRequestClient
resumeConsumption
in interface PartitionRequestClient
inputChannel
- The remote input channel who is ready to resume data consumption.public void acknowledgeAllRecordsProcessed(RemoteInputChannel inputChannel)
PartitionRequestClient
acknowledgeAllRecordsProcessed
in interface PartitionRequestClient
inputChannel
- The input channel to resume data consumption.public void close(RemoteInputChannel inputChannel) throws IOException
PartitionRequestClient
close
in interface PartitionRequestClient
inputChannel
- The remote input channel for canceling partition and to be removed from
network stack.IOException
public void closeConnection()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.