Package io.trino.spiller
Class GenericPartitioningSpiller
java.lang.Object
io.trino.spiller.GenericPartitioningSpiller
- All Implemented Interfaces:
PartitioningSpiller,Closeable,AutoCloseable
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.trino.spiller.PartitioningSpiller
PartitioningSpiller.PartitioningSpillResult -
Constructor Summary
ConstructorsConstructorDescriptionGenericPartitioningSpiller(List<Type> types, PartitionFunction partitionFunction, SpillContext spillContext, AggregatedMemoryContext memoryContext, SingleStreamSpillerFactory spillerFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes and removes all underlying resources used during spilling.getSpilledPages(int partition) Returns iterator of previously spilled pages from given partition.partitionAndSpill(Page page, IntPredicate spillPartitionMask) Partition page and enqueue partitioned pages to spill writers.void
-
Constructor Details
-
GenericPartitioningSpiller
public GenericPartitioningSpiller(List<Type> types, PartitionFunction partitionFunction, SpillContext spillContext, AggregatedMemoryContext memoryContext, SingleStreamSpillerFactory spillerFactory)
-
-
Method Details
-
getSpilledPages
Description copied from interface:PartitioningSpillerReturns 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.
- Specified by:
getSpilledPagesin interfacePartitioningSpiller
-
verifyAllPartitionsRead
public void verifyAllPartitionsRead()- Specified by:
verifyAllPartitionsReadin interfacePartitioningSpiller
-
partitionAndSpill
public PartitioningSpiller.PartitioningSpillResult partitionAndSpill(Page page, IntPredicate spillPartitionMask) Description copied from interface:PartitioningSpillerPartition 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.
- Specified by:
partitionAndSpillin interfacePartitioningSpiller
-
close
Description copied from interface:PartitioningSpillerCloses and removes all underlying resources used during spilling.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfacePartitioningSpiller- Throws:
IOException
-