This project has retired. For details please refer to its
Attic page .
Aggregate.TopKCombineFn (Apache Crunch 0.9.0 API)
org.apache.crunch.lib
Class Aggregate.TopKCombineFn<K,V>
java.lang.Object
org.apache.crunch.DoFn <Pair <S,Iterable <T>>,Pair <S,T>>
org.apache.crunch.CombineFn <Integer ,Pair <K,V>>
org.apache.crunch.lib.Aggregate.TopKCombineFn<K,V>
All Implemented Interfaces: Serializable
Enclosing class: Aggregate
public static class Aggregate.TopKCombineFn<K,V> extends CombineFn <Integer ,Pair <K,V>>
See Also: Serialized Form
Methods inherited from class org.apache.crunch.DoFn
cleanup , configure , disableDeepCopy , getConfiguration , getContext , getCounter , getCounter , getStatus , getTaskAttemptID , increment , increment , increment , increment , initialize , progress , scaleFactor , setConfiguration , 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 <Integer ,Iterable <Pair <K ,V >>> input,
Emitter <Pair <Integer ,Pair <K ,V >>> emitter)
Description copied from class: DoFn
Processes the records from a PCollection
.
Note: Crunch can reuse a single input record object whose content
changes on each 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.
Specified by: process
in class DoFn <Pair <Integer ,Iterable <Pair <K ,V >>>,Pair <Integer ,Pair <K ,V >>>
Parameters: input
- The input record.emitter
- The emitter to send the output to
Copyright © 2014 The Apache Software Foundation . All Rights Reserved.