Class SpilledRuns
java.lang.Object
org.apache.drill.exec.physical.impl.xsort.SpilledRuns
Represents the set of spilled batches, including methods to spill and/or
merge a set of batches to produce a new spill file.
-
Constructor Summary
ConstructorDescriptionSpilledRuns
(OperatorContext opContext, SpillSet spillSet, PriorityQueueCopierWrapper copier) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
finalMerge
(List<? extends BatchGroup> bufferedBatches, VectorContainer container, int mergeRowCount, VectorInitializer allocHelper) long
boolean
void
mergeAndSpill
(List<BatchGroup> batchesToSpill, int spillBatchRowCount, VectorInitializer allocHelper) void
mergeRuns
(int targetCount, long mergeMemoryPool, int spillBatchRowCount, VectorInitializer allocHelper) static List<BatchGroup>
prepareSpillBatches
(LinkedList<? extends BatchGroup> source, int spillCount) void
setSchema
(BatchSchema schema) int
size()
-
Constructor Details
-
SpilledRuns
-
-
Method Details
-
setSchema
-
size
public int size() -
hasSpilled
public boolean hasSpilled() -
getWriteBytes
public long getWriteBytes() -
prepareSpillBatches
public static List<BatchGroup> prepareSpillBatches(LinkedList<? extends BatchGroup> source, int spillCount) -
mergeAndSpill
public void mergeAndSpill(List<BatchGroup> batchesToSpill, int spillBatchRowCount, VectorInitializer allocHelper) -
mergeRuns
public void mergeRuns(int targetCount, long mergeMemoryPool, int spillBatchRowCount, VectorInitializer allocHelper) -
finalMerge
public SortImpl.SortResults finalMerge(List<? extends BatchGroup> bufferedBatches, VectorContainer container, int mergeRowCount, VectorInitializer allocHelper) -
close
public void close()
-