@ThreadSafe public class GenericPartitioningSpiller extends Object implements PartitioningSpiller
PartitioningSpiller.PartitioningSpillResult| Constructor and Description |
|---|
GenericPartitioningSpiller(List<Type> types,
PartitionFunction partitionFunction,
SpillContext spillContext,
AggregatedMemoryContext memoryContext,
SingleStreamSpillerFactory spillerFactory) |
| Modifier and Type | Method and 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() |
public GenericPartitioningSpiller(List<Type> types, PartitionFunction partitionFunction, SpillContext spillContext, AggregatedMemoryContext memoryContext, SingleStreamSpillerFactory spillerFactory)
public Iterator<Page> getSpilledPages(int partition)
PartitioningSpillerThis method may not be called if previously initiated spilling is not finished yet.
This method may perform blocking I/O to flush internal buffers.
getSpilledPages in interface PartitioningSpillerpublic void verifyAllPartitionsRead()
verifyAllPartitionsRead in interface PartitioningSpillerpublic PartitioningSpiller.PartitioningSpillResult partitionAndSpill(Page page, IntPredicate spillPartitionMask)
PartitioningSpillerPartitioningSpiller.PartitioningSpillResult.getSpillingFuture() is completed when spilling is finished.
This method may not be called if previously initiated spilling is not finished yet.
partitionAndSpill in interface PartitioningSpillerpublic void close()
throws IOException
PartitioningSpillerclose in interface PartitioningSpillerclose in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2012–2019. All rights reserved.