public abstract class ExtentBase extends BaseOperation<Tuple[]> implements Aggregator<Tuple[]>
fieldDeclaration, numArgs, trace
Modifier | Constructor and Description |
---|---|
protected |
ExtentBase(Fields fieldDeclaration) |
protected |
ExtentBase(Fields fieldDeclaration,
Tuple... ignoreTuples) |
protected |
ExtentBase(int numArgs,
Fields fieldDeclaration) |
Modifier and Type | Method and Description |
---|---|
void |
aggregate(FlowProcess flowProcess,
AggregatorCall<Tuple[]> aggregatorCall)
Method aggregate is called for each
TupleEntry value in the current grouping. |
void |
complete(FlowProcess flowProcess,
AggregatorCall<Tuple[]> aggregatorCall)
Method complete will be issued last after every
TupleEntry has been passed to the
Aggregator.aggregate(cascading.flow.FlowProcess, AggregatorCall)
method. |
boolean |
equals(java.lang.Object object) |
java.util.Collection<Tuple> |
getIgnoreTuples() |
protected Tuple |
getResult(AggregatorCall<Tuple[]> aggregatorCall) |
int |
hashCode() |
protected abstract void |
performOperation(Tuple[] context,
TupleEntry entry) |
void |
prepare(FlowProcess flowProcess,
OperationCall<Tuple[]> operationCall)
Method prepare does nothing, and may safely be overridden.
|
void |
start(FlowProcess flowProcess,
AggregatorCall<Tuple[]> aggregatorCall)
Method start initializes the aggregation procedure and is called for every unique grouping.
|
cleanup, flush, getFieldDeclaration, getNumArgs, getTrace, isSafe, printOperationInternal, toString, toStringInternal
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
cleanup, flush, getFieldDeclaration, getNumArgs, isSafe
@ConstructorProperties(value="fieldDeclaration") protected ExtentBase(Fields fieldDeclaration)
@ConstructorProperties(value={"numArgs","fieldDeclaration"}) protected ExtentBase(int numArgs, Fields fieldDeclaration)
@ConstructorProperties(value={"fieldDeclaration","ignoreTuples"}) protected ExtentBase(Fields fieldDeclaration, Tuple... ignoreTuples)
public java.util.Collection<Tuple> getIgnoreTuples()
public void prepare(FlowProcess flowProcess, OperationCall<Tuple[]> operationCall)
BaseOperation
public void start(FlowProcess flowProcess, AggregatorCall<Tuple[]> aggregatorCall)
Aggregator
Aggregator.aggregate(cascading.flow.FlowProcess, AggregatorCall)
call,
new HashMap() should be set on the AggregatorCall instance when OperationCall.getContext()
is null.
On the next grouping, start() will be called again, but this time with the old Map instance. In this case,
map.clear() should be invoked before returning.start
in interface Aggregator<Tuple[]>
flowProcess
- of type FlowProcessaggregatorCall
- of type AggregatorCallpublic void aggregate(FlowProcess flowProcess, AggregatorCall<Tuple[]> aggregatorCall)
Aggregator
TupleEntry
value in the current grouping.
TupleEntry entry, or entry.getTuple() should not be stored directly in the context. A copy of the tuple
should be made via the new Tuple( entry.getTuple() )
copy constructor.aggregate
in interface Aggregator<Tuple[]>
flowProcess
- of type FlowProcessaggregatorCall
- of type AggregatorCallprotected abstract void performOperation(Tuple[] context, TupleEntry entry)
public void complete(FlowProcess flowProcess, AggregatorCall<Tuple[]> aggregatorCall)
Aggregator
TupleEntry
has been passed to the
Aggregator.aggregate(cascading.flow.FlowProcess, AggregatorCall)
method. Any final calculation should be completed here and passed to the outputCollector.complete
in interface Aggregator<Tuple[]>
flowProcess
- of type FlowProcessaggregatorCall
- of type AggregatorCallprotected Tuple getResult(AggregatorCall<Tuple[]> aggregatorCall)
public boolean equals(java.lang.Object object)
equals
in class BaseOperation<Tuple[]>
public int hashCode()
hashCode
in class BaseOperation<Tuple[]>
Copyright © 2007-2015 Xplenty, Inc. All Rights Reserved.