As of Cascading 2.2, the FirstNBuffer Buffer is provided as an optimized means to determine the top N elements in a grouping.
The
cascading.operation.buffer.FirstNBuffer
Buffer
returns the first N tuples seen in
a given grouping. Unlike the
cascading.pipe.assembly.FirstBy
AggregateBy
and
cascading.operation.aggregator.First
Aggregator
,
FirstNBuffer
will stop iterating the
available tuples when the top N condition is met.
FirstNBuffer
is used by
cascading.pipe.assembly.Unique
.
Copyright © 2007-2012 Concurrent, Inc. All Rights Reserved.