public class SortImpl extends Object
ExternalSortBatch class.
Accepts incoming batches. Sorts each and will spill to disk as needed. When all input is delivered, can either do an in-memory merge or a merge from disk. If runs spilled, may have to do one or more "consolidation" passes to reduce the number of runs to the level that will fit in memory.
| Modifier and Type | Class and Description |
|---|---|
static class |
SortImpl.EmptyResults |
static class |
SortImpl.SingleBatchResults
Return results for a single input batch.
|
static interface |
SortImpl.SortResults
Iterates over the final sorted results.
|
| Constructor and Description |
|---|
SortImpl(OperatorContext opContext,
SortConfig sortConfig,
SpilledRuns spilledRuns,
VectorContainer batch) |
| Modifier and Type | Method and Description |
|---|---|
void |
addBatch(VectorAccessible incoming)
Process the converted incoming batch by adding it to the in-memory store
of data, or spilling data to disk when necessary.
|
void |
close() |
boolean |
forceSpill() |
SortMetrics |
getMetrics() |
OperatorContext |
opContext() |
void |
setSchema(BatchSchema schema) |
SortImpl.SortResults |
startMerge() |
String |
toString() |
public SortImpl(OperatorContext opContext, SortConfig sortConfig, SpilledRuns spilledRuns, VectorContainer batch)
public OperatorContext opContext()
public void setSchema(BatchSchema schema)
public boolean forceSpill()
public void addBatch(VectorAccessible incoming)
incoming - public SortMetrics getMetrics()
public SortImpl.SortResults startMerge()
public void close()
Copyright © 2021 The Apache Software Foundation. All rights reserved.