public class GroupedAggregator extends Object implements Aggregator<Object[]>
| Constructor and Description |
|---|
GroupedAggregator(Aggregator agg,
Fields group,
Fields input,
int outSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
aggregate(Object[] arr,
TridentTuple tuple,
TridentCollector collector) |
void |
cleanup()
When running in local mode, called when the local cluster is being shut down.
|
void |
complete(Object[] arr,
TridentCollector collector) |
Object[] |
init(Object batchId,
TridentCollector collector) |
void |
prepare(Map<String,Object> conf,
TridentOperationContext context)
Called when the
Operation is first initialized. |
public GroupedAggregator(Aggregator agg, Fields group, Fields input, int outSize)
public void prepare(Map<String,Object> conf, TridentOperationContext context)
OperationCalled when the Operation is first initialized.
prepare in interface Operationconf - the Storm configuration mapcontext - the operation context which provides information such as the number of partitions in the stream, and the current partition index. It also provides methods for registering operation-specific metrics.TridentOperationContextpublic Object[] init(Object batchId, TridentCollector collector)
init in interface Aggregator<Object[]>public void aggregate(Object[] arr, TridentTuple tuple, TridentCollector collector)
aggregate in interface Aggregator<Object[]>public void complete(Object[] arr, TridentCollector collector)
complete in interface Aggregator<Object[]>Copyright © 2021 The Apache Software Foundation. All rights reserved.