public abstract class HashAggTemplate extends Object implements HashAggregator
| Modifier and Type | Class and Description |
|---|---|
class |
HashAggTemplate.BatchHolder |
static class |
HashAggTemplate.Metric |
HashAggregator.AggIterOutcome, HashAggregator.AggOutcome| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
logger |
TEMPLATE_DEFINITION| Constructor and Description |
|---|
HashAggTemplate() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allFlushed() |
boolean |
buildComplete() |
void |
cleanup() |
abstract void |
doSetup(RecordBatch incoming) |
HashAggregator.AggOutcome |
doWork()
Read and process (i.e., insert into the hash table and aggregate) records from the current batch.
|
boolean |
earlyOutput() |
RecordBatch |
getNewIncoming()
get new incoming: (when reading spilled files like an "incoming")
|
RecordBatch.IterOutcome |
getOutcome() |
int |
getOutputCount() |
abstract int |
getVectorIndex(int recordIndex) |
protected HashAggTemplate.BatchHolder |
newBatchHolder() |
int |
numGroupedRecords() |
HashAggregator.AggIterOutcome |
outputCurrentBatch()
Output the next batch from partition "nextPartitionToReturn"
|
abstract boolean |
resetValues() |
void |
setup(HashAggregate hashAggrConfig,
HashTableConfig htConfig,
FragmentContext context,
OperatorContext oContext,
RecordBatch incoming,
HashAggBatch outgoing,
LogicalExpression[] valueExprs,
List<TypedFieldId> valueFieldIds,
TypedFieldId[] groupByOutFieldIds,
VectorContainer outContainer,
int extraRowBytes) |
public void setup(HashAggregate hashAggrConfig, HashTableConfig htConfig, FragmentContext context, OperatorContext oContext, RecordBatch incoming, HashAggBatch outgoing, LogicalExpression[] valueExprs, List<TypedFieldId> valueFieldIds, TypedFieldId[] groupByOutFieldIds, VectorContainer outContainer, int extraRowBytes) throws SchemaChangeException, IOException
setup in interface HashAggregatorSchemaChangeExceptionIOExceptionpublic RecordBatch getNewIncoming()
getNewIncoming in interface HashAggregatorpublic HashAggregator.AggOutcome doWork()
doWork in interface HashAggregatorpublic RecordBatch.IterOutcome getOutcome()
getOutcome in interface HashAggregatorpublic int getOutputCount()
getOutputCount in interface HashAggregatorpublic void cleanup()
cleanup in interface HashAggregatorprotected HashAggTemplate.BatchHolder newBatchHolder()
public HashAggregator.AggIterOutcome outputCurrentBatch()
outputCurrentBatch in interface HashAggregatorpublic boolean allFlushed()
allFlushed in interface HashAggregatorpublic boolean buildComplete()
buildComplete in interface HashAggregatorpublic boolean earlyOutput()
earlyOutput in interface HashAggregatorpublic int numGroupedRecords()
public abstract void doSetup(@Named(value="incoming")
RecordBatch incoming)
throws SchemaChangeException
SchemaChangeExceptionpublic abstract int getVectorIndex(@Named(value="recordIndex")
int recordIndex)
throws SchemaChangeException
SchemaChangeExceptionpublic abstract boolean resetValues()
throws SchemaChangeException
SchemaChangeExceptionCopyright © 2017 The Apache Software Foundation. All rights reserved.