This project has retired. For details please refer to its Attic page.
MapValuesFn (Apache Crunch 0.4.0-incubating API)

org.apache.crunch.fn
Class MapValuesFn<K,V1,V2>

java.lang.Object
  extended by org.apache.crunch.DoFn<Pair<K,V1>,Pair<K,V2>>
      extended by org.apache.crunch.fn.MapValuesFn<K,V1,V2>
All Implemented Interfaces:
Serializable

public abstract class MapValuesFn<K,V1,V2>
extends DoFn<Pair<K,V1>,Pair<K,V2>>

See Also:
Serialized Form

Constructor Summary
MapValuesFn()
           
 
Method Summary
abstract  V2 map(V1 v)
           
 void process(Pair<K,V1> input, Emitter<Pair<K,V2>> emitter)
          Processes the records from a PCollection.
 
Methods inherited from class org.apache.crunch.DoFn
cleanup, configure, initialize, scaleFactor, setContext
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapValuesFn

public MapValuesFn()
Method Detail

process

public void process(Pair<K,V1> input,
                    Emitter<Pair<K,V2>> 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<K,V1>,Pair<K,V2>>
Parameters:
input - The input record.
emitter - The emitter to send the output to

map

public abstract V2 map(V1 v)


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.