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 ClassGenerator<?> |
cg |
protected FragmentContext |
context |
protected static org.slf4j.Logger |
logger |
TEMPLATE_DEFINITION
Constructor and Description |
---|
HashAggTemplate() |
Modifier and Type | Method and Description |
---|---|
void |
adjustOutputCount(int outputBatchSize,
int oldRowWidth,
int newRowWidth) |
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) |
boolean |
handlingEmit() |
protected HashAggTemplate.BatchHolder |
injectMembers(HashAggTemplate.BatchHolder batchHolder) |
protected HashAggTemplate.BatchHolder |
newBatchHolder(int batchRowCount) |
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,
ClassGenerator<?> cg,
TypedFieldId[] groupByOutFieldIds,
VectorContainer outContainer,
int extraRowBytes) |
String |
toString() |
protected static final org.slf4j.Logger logger
protected FragmentContext context
protected ClassGenerator<?> cg
public void setup(HashAggregate hashAggrConfig, HashTableConfig htConfig, FragmentContext context, OperatorContext oContext, RecordBatch incoming, HashAggBatch outgoing, LogicalExpression[] valueExprs, List<TypedFieldId> valueFieldIds, ClassGenerator<?> cg, TypedFieldId[] groupByOutFieldIds, VectorContainer outContainer, int extraRowBytes)
setup
in interface HashAggregator
public RecordBatch getNewIncoming()
getNewIncoming
in interface HashAggregator
public HashAggregator.AggOutcome doWork()
doWork
in interface HashAggregator
public RecordBatch.IterOutcome getOutcome()
getOutcome
in interface HashAggregator
public int getOutputCount()
getOutputCount
in interface HashAggregator
public void adjustOutputCount(int outputBatchSize, int oldRowWidth, int newRowWidth)
adjustOutputCount
in interface HashAggregator
public void cleanup()
cleanup
in interface HashAggregator
protected HashAggTemplate.BatchHolder newBatchHolder(int batchRowCount)
protected HashAggTemplate.BatchHolder injectMembers(HashAggTemplate.BatchHolder batchHolder)
public HashAggregator.AggIterOutcome outputCurrentBatch()
outputCurrentBatch
in interface HashAggregator
public boolean allFlushed()
allFlushed
in interface HashAggregator
public boolean buildComplete()
buildComplete
in interface HashAggregator
public boolean handlingEmit()
handlingEmit
in interface HashAggregator
public boolean earlyOutput()
earlyOutput
in interface HashAggregator
public int numGroupedRecords()
public abstract void doSetup(@Named(value="incoming") RecordBatch incoming) throws SchemaChangeException
SchemaChangeException
public abstract int getVectorIndex(@Named(value="recordIndex") int recordIndex) throws SchemaChangeException
SchemaChangeException
public abstract boolean resetValues() throws SchemaChangeException
SchemaChangeException
Copyright © 1970 The Apache Software Foundation. All rights reserved.