public abstract class ComparisonAggregator<T> extends BaseAggregator<ComparisonAggregator.State>
Aggregator
for comparing two values in a stream.Modifier and Type | Class and Description |
---|---|
static class |
ComparisonAggregator.State |
Constructor and Description |
---|
ComparisonAggregator(String inputFieldName) |
Modifier and Type | Method and Description |
---|---|
void |
aggregate(ComparisonAggregator.State state,
TridentTuple tuple,
TridentCollector collector) |
protected abstract T |
compare(T value1,
T value2) |
void |
complete(ComparisonAggregator.State state,
TridentCollector collector) |
ComparisonAggregator.State |
init(Object batchId,
TridentCollector collector) |
protected T |
valueFromTuple(TridentTuple tuple) |
cleanup, prepare
public ComparisonAggregator(String inputFieldName)
public ComparisonAggregator.State init(Object batchId, TridentCollector collector)
public void aggregate(ComparisonAggregator.State state, TridentTuple tuple, TridentCollector collector)
protected T valueFromTuple(TridentTuple tuple)
public void complete(ComparisonAggregator.State state, TridentCollector collector)
Copyright © 2023 The Apache Software Foundation. All rights reserved.