Interface PartitioningSpiller

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
GenericPartitioningSpiller

public interface PartitioningSpiller extends Closeable
  • Method Details

    • partitionAndSpill

      PartitioningSpiller.PartitioningSpillResult partitionAndSpill(Page page, IntPredicate spillPartitionMask)
      Partition page and enqueue partitioned pages to spill writers. PartitioningSpiller.PartitioningSpillResult.getSpillingFuture() is completed when spilling is finished.

      This method may not be called if previously initiated spilling is not finished yet.

    • getSpilledPages

      Iterator<Page> getSpilledPages(int partition)
      Returns iterator of previously spilled pages from given partition. Callers are expected to call this method once. Calling multiple times can results in undefined behavior.

      This method may not be called if previously initiated spilling is not finished yet.

      This method may perform blocking I/O to flush internal buffers.

    • verifyAllPartitionsRead

      void verifyAllPartitionsRead()
    • close

      void close() throws IOException
      Closes and removes all underlying resources used during spilling.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException