Interface ConnectorPageSink


public interface ConnectorPageSink
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final CompletableFuture<?>
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    Returns a future that will be completed when the page sink can accept more pages.
    CompletableFuture<Collection<io.airlift.slice.Slice>>
    Notifies the connector that no more pages will be appended and returns connector-specific information that will be sent to the coordinator to complete the write operation.
    default long
    Gets the number of output bytes written by this page source so far.
    default long
    Get the total memory that needs to be reserved in the memory pool.
    default long
    ConnectorPageSink can provide optional validation to check the data is correctly consumed by connector (e.g.
  • Field Details

  • Method Details

    • getCompletedBytes

      default long getCompletedBytes()
      Gets the number of output bytes written by this page source so far. If size is not available, this method should return zero.
    • getMemoryUsage

      default long getMemoryUsage()
      Get the total memory that needs to be reserved in the memory pool. This memory should include any buffers, etc. that are used for reading data.
      Returns:
      the memory used so far in table read
    • getValidationCpuNanos

      default long getValidationCpuNanos()
      ConnectorPageSink can provide optional validation to check the data is correctly consumed by connector (e.g. output table has the correct data).

      This method returns the CPU spent on validation, if any.

    • appendPage

      CompletableFuture<?> appendPage(Page page)
      Returns a future that will be completed when the page sink can accept more pages. If the page sink can accept more pages immediately, this method should return NOT_BLOCKED.
    • finish

      CompletableFuture<Collection<io.airlift.slice.Slice>> finish()
      Notifies the connector that no more pages will be appended and returns connector-specific information that will be sent to the coordinator to complete the write operation. This method may be called immediately after the previous call to appendPage(io.trino.spi.Page) (even if the returned future is not complete).
    • abort

      void abort()