com.cloudera.crunch.lib
Class Aggregate.TopKCombineFn<K,V>
java.lang.Object
com.cloudera.crunch.DoFn<Pair<S,Iterable<T>>,Pair<S,T>>
com.cloudera.crunch.CombineFn<Boolean,Pair<K,V>>
com.cloudera.crunch.lib.Aggregate.TopKCombineFn<K,V>
- All Implemented Interfaces:
- Serializable
- Enclosing class:
- Aggregate
public static class Aggregate.TopKCombineFn<K,V>
- extends CombineFn<Boolean,Pair<K,V>>
- See Also:
- Serialized Form
Nested classes/interfaces inherited from class com.cloudera.crunch.CombineFn |
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.SumBigInts, CombineFn.SumDoubles, CombineFn.SumFloats, CombineFn.SumInts, CombineFn.SumLongs, CombineFn.TripAggregator<A,B,C>, CombineFn.TupleNAggregator |
Fields inherited from class com.cloudera.crunch.CombineFn |
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 |
Methods inherited from class com.cloudera.crunch.CombineFn |
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, SUM_BIGINTS, SUM_DOUBLES, SUM_FLOATS, SUM_INTS, SUM_LONGS, tripAggregator, tupleAggregator |
Methods inherited from class com.cloudera.crunch.DoFn |
cleanup, configure, getConfiguration, getCounter, getCounter, getStatus, getTaskAttemptID, initialize, progress, scaleFactor, setConfigurationForTest, setContext, setStatus |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Aggregate.TopKCombineFn
public Aggregate.TopKCombineFn(int limit,
boolean maximize)
process
public void process(Pair<Boolean,Iterable<Pair<K,V>>> input,
Emitter<Pair<Boolean,Pair<K,V>>> emitter)
- Description copied from class:
DoFn
- Processes the records from a
PCollection
.
- Specified by:
process
in class DoFn<Pair<Boolean,Iterable<Pair<K,V>>>,Pair<Boolean,Pair<K,V>>>
- Parameters:
input
- The input recordemitter
- The emitter to send the output to
Copyright © 2012. All Rights Reserved.