Package io.trino.spiller
Interface PartitioningSpiller
-
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
GenericPartitioningSpiller
public interface PartitioningSpiller extends Closeable
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classPartitioningSpiller.PartitioningSpillResult
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Closes and removes all underlying resources used during spilling.Iterator<Page>getSpilledPages(int partition)Returns iterator of previously spilled pages from given partition.PartitioningSpiller.PartitioningSpillResultpartitionAndSpill(Page page, IntPredicate spillPartitionMask)Partition page and enqueue partitioned pages to spill writers.voidverifyAllPartitionsRead()
-
-
-
Method Detail
-
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 IOExceptionCloses and removes all underlying resources used during spilling.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-