Class NettyPartitionRequestClient

    • Method Detail

      • requestSubpartition

        public void requestSubpartition​(ResultPartitionID partitionId,
                                        int subpartitionIndex,
                                        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:
        requestSubpartition in interface PartitionRequestClient
        Parameters:
        partitionId - The identifier of result partition to be requested.
        subpartitionIndex - The sub partition index 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:
        sendTaskEvent in interface PartitionRequestClient
        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
      • notifyNewBufferSize

        public void notifyNewBufferSize​(RemoteInputChannel inputChannel,
                                        int bufferSize)
        Description copied from interface: PartitionRequestClient
        Notifies new buffer size from one remote input channel.
        Specified by:
        notifyNewBufferSize in interface PartitionRequestClient
        Parameters:
        inputChannel - The remote input channel who announces the new buffer size.
        bufferSize - The new buffer size.
      • close

        public void close​(RemoteInputChannel inputChannel)
                   throws IOException
        Description copied from interface: PartitionRequestClient
        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.
        Specified by:
        close in interface PartitionRequestClient
        Parameters:
        inputChannel - The remote input channel for canceling partition and to be removed from network stack.
        Throws:
        IOException
      • closeConnection

        public void closeConnection()