Class NettyPartitionRequestClient
java.lang.Object
org.apache.flink.runtime.io.network.netty.NettyPartitionRequestClient
- All Implemented Interfaces:
PartitionRequestClient
Partition request client for remote partition requests.
This client is shared by all remote input channels, which request a partition from the same
ConnectionID.
-
Method Summary
Modifier and TypeMethodDescriptionvoidacknowledgeAllRecordsProcessed(RemoteInputChannel inputChannel) Acknowledges all user records are processed for this channel.voidclose(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.voidvoidnotifyCreditAvailable(RemoteInputChannel inputChannel) Notifies available credits from one remote input channel.voidnotifyNewBufferSize(RemoteInputChannel inputChannel, int bufferSize) Notifies new buffer size from one remote input channel.voidnotifyRequiredSegmentId(RemoteInputChannel inputChannel, int subpartitionIndex, int segmentId) Notifies the id of segment required from one remote input channel.voidrequestSubpartition(ResultPartitionID partitionId, ResultSubpartitionIndexSet subpartitionIndexSet, RemoteInputChannel inputChannel, int delayMs) Requests a remote intermediate result partition queue.voidresumeConsumption(RemoteInputChannel inputChannel) Requests to resume data consumption from one remote input channel.voidsendTaskEvent(ResultPartitionID partitionId, TaskEvent event, RemoteInputChannel inputChannel) Sends a task event backwards to an intermediate result partition producer.
-
Method Details
-
requestSubpartition
public void requestSubpartition(ResultPartitionID partitionId, ResultSubpartitionIndexSet subpartitionIndexSet, RemoteInputChannel inputChannel, int delayMs) throws IOException Requests a remote intermediate result partition queue.The request goes to the remote producer, for which this partition request client instance has been created.
- Specified by:
requestSubpartitionin interfacePartitionRequestClient- Parameters:
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.- Throws:
IOException
-
sendTaskEvent
public void sendTaskEvent(ResultPartitionID partitionId, TaskEvent event, RemoteInputChannel inputChannel) throws IOException Sends a task event backwards to an intermediate result partition producer.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.
- Specified by:
sendTaskEventin interfacePartitionRequestClient- Parameters:
partitionId- The identifier of result partition.event- The task event to be sent.inputChannel- The remote input channel for sending this event.- Throws:
IOException
-
notifyCreditAvailable
Description copied from interface:PartitionRequestClientNotifies available credits from one remote input channel.- Specified by:
notifyCreditAvailablein interfacePartitionRequestClient- Parameters:
inputChannel- The remote input channel who announces the available credits.
-
notifyNewBufferSize
Description copied from interface:PartitionRequestClientNotifies new buffer size from one remote input channel.- Specified by:
notifyNewBufferSizein interfacePartitionRequestClient- Parameters:
inputChannel- The remote input channel who announces the new buffer size.bufferSize- The new buffer size.
-
notifyRequiredSegmentId
public void notifyRequiredSegmentId(RemoteInputChannel inputChannel, int subpartitionIndex, int segmentId) Description copied from interface:PartitionRequestClientNotifies the id of segment required from one remote input channel.- Specified by:
notifyRequiredSegmentIdin interfacePartitionRequestClient- Parameters:
inputChannel- The remote input channel who requires segment.subpartitionIndex- The id of the corresponding subpartition.segmentId- The id of segment.
-
resumeConsumption
Description copied from interface:PartitionRequestClientRequests to resume data consumption from one remote input channel.- Specified by:
resumeConsumptionin interfacePartitionRequestClient- Parameters:
inputChannel- The remote input channel who is ready to resume data consumption.
-
acknowledgeAllRecordsProcessed
Description copied from interface:PartitionRequestClientAcknowledges all user records are processed for this channel.- Specified by:
acknowledgeAllRecordsProcessedin interfacePartitionRequestClient- Parameters:
inputChannel- The input channel to resume data consumption.
-
close
Description copied from interface:PartitionRequestClientCancels 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.- Specified by:
closein interfacePartitionRequestClient- Parameters:
inputChannel- The remote input channel for canceling partition and to be removed from network stack.- Throws:
IOException
-
closeConnection
public void closeConnection()
-