Package io.prestosql.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 class
PartitioningSpiller.PartitioningSpillResult
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Closes and removes all underlying resources used during spilling.Iterator<Page>
getSpilledPages(int partition)
Returns iterator of previously spilled pages from given partition.PartitioningSpiller.PartitioningSpillResult
partitionAndSpill(Page page, IntPredicate spillPartitionMask)
Partition page and enqueue partitioned pages to spill writers.void
verifyAllPartitionsRead()
-
-
-
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 IOException
Closes and removes all underlying resources used during spilling.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
-