public static class Aggregate.TopKCombineFn<K,V> extends CombineFn<Integer,Pair<K,V>>
CombineFn.Aggregator<T>, CombineFn.AggregatorCombineFn<K,V>, CombineFn.AggregatorFactory<T>, CombineFn.FirstNAggregator<V>, CombineFn.LastNAggregator<V>, CombineFn.MaxBigInts, CombineFn.MaxDoubles, CombineFn.MaxFloats, CombineFn.MaxInts, CombineFn.MaxLongs, CombineFn.MaxNAggregator<V extends Comparable<V>>, CombineFn.MinBigInts, CombineFn.MinDoubles, CombineFn.MinFloats, CombineFn.MinInts, CombineFn.MinLongs, CombineFn.MinNAggregator<V extends Comparable<V>>, CombineFn.PairAggregator<V1,V2>, CombineFn.QuadAggregator<A,B,C,D>, CombineFn.SimpleAggregator<T>, CombineFn.StringConcatAggregator, CombineFn.SumBigInts, CombineFn.SumDoubles, CombineFn.SumFloats, CombineFn.SumInts, CombineFn.SumLongs, CombineFn.TripAggregator<A,B,C>, CombineFn.TupleNAggregator
MAX_BIGINTS, MAX_DOUBLES, MAX_FLOATS, MAX_INTS, MAX_LONGS, MIN_BIGINTS, MIN_DOUBLES, MIN_FLOATS, MIN_INTS, MIN_LONGS, SUM_BIGINTS, SUM_DOUBLES, SUM_FLOATS, SUM_INTS, SUM_LONGS
Constructor and Description |
---|
Aggregate.TopKCombineFn(int limit,
boolean maximize) |
Modifier and Type | Method and Description |
---|---|
void |
process(Pair<Integer,Iterable<Pair<K,V>>> input,
Emitter<Pair<Integer,Pair<K,V>>> emitter)
Processes the records from a
PCollection . |
aggregator, aggregatorFactory, FIRST_N, LAST_N, MAX_BIGINTS, MAX_BIGINTS, MAX_DOUBLES, MAX_DOUBLES, MAX_FLOATS, MAX_FLOATS, MAX_INTS, MAX_INTS, MAX_LONGS, MAX_LONGS, MIN_BIGINTS, MIN_BIGINTS, MIN_DOUBLES, MIN_DOUBLES, MIN_FLOATS, MIN_FLOATS, MIN_INTS, MIN_INTS, MIN_LONGS, MIN_LONGS, pairAggregator, quadAggregator, STRING_CONCAT, STRING_CONCAT, SUM_BIGINTS, SUM_DOUBLES, SUM_FLOATS, SUM_INTS, SUM_LONGS, tripAggregator, tupleAggregator
cleanup, configure, initialize, scaleFactor, setContext
public Aggregate.TopKCombineFn(int limit, boolean maximize)
public void process(Pair<Integer,Iterable<Pair<K,V>>> input, Emitter<Pair<Integer,Pair<K,V>>> emitter)
DoFn
PCollection
.
DoFn.process(Object, Emitter)
method call. This
functionality is imposed by Hadoop's Reducer implementation: The framework will reuse the key and value
objects that are passed into the reduce, therefore the application should
clone the objects they want to keep a copy of.Copyright © 2013 The Apache Software Foundation. All Rights Reserved.