public interface PriorityQueue
| Modifier and Type | Field and Description |
|---|---|
static TemplateClassDefinition<PriorityQueue> |
TEMPLATE_DEFINITION |
| Modifier and Type | Method and Description |
|---|---|
void |
add(RecordBatchData batch)
The elements in the given batch are added to the priority queue.
|
void |
cleanup()
Releases all the memory consumed by the priority queue.
|
void |
generate()
This method must be called before fetching the final priority queue hyper batch and final Sv4 vector.
|
SelectionVector4 |
getFinalSv4()
Retrieves the selection vector used to select the elements in the priority queue from the hyper batch
provided by the
getHyperBatch() method. |
VectorContainer |
getHyperBatch()
Retrieves the final priority queue HyperBatch containing the results.
|
SelectionVector4 |
getSv4() |
void |
init(int limit,
BufferAllocator allocator,
boolean hasSv2)
Initializes the priority queue.
|
void |
resetQueue(VectorContainer container,
SelectionVector4 vector4) |
static final TemplateClassDefinition<PriorityQueue> TEMPLATE_DEFINITION
void add(RecordBatchData batch) throws SchemaChangeException
init(int, BufferAllocator, boolean)
method.batch - The batch containing elements we want to add.SchemaChangeExceptionvoid init(int limit,
BufferAllocator allocator,
boolean hasSv2)
throws SchemaChangeException
limit - The size of the priority queue.allocator - The BufferAllocator to use when creating the priority queue.hasSv2 - True when incoming batches have 2 byte selection vectors. False otherwise.SchemaChangeExceptionvoid generate()
throws SchemaChangeException
SchemaChangeExceptionVectorContainer getHyperBatch()
generate().SelectionVector4 getSv4()
SelectionVector4 getFinalSv4()
getHyperBatch() method. Note: this should be called after generate().void resetQueue(VectorContainer container, SelectionVector4 vector4) throws SchemaChangeException
SchemaChangeExceptionvoid cleanup()
Copyright © 2017 The Apache Software Foundation. All rights reserved.