This project has retired. For details please refer to its Attic page.
SFlatMapFunction2 (Apache Crunch 0.11.0 API)

org.apache.crunch.fn
Class SFlatMapFunction2<K,V,R>

java.lang.Object
  extended by org.apache.crunch.DoFn<Pair<K,V>,R>
      extended by org.apache.crunch.fn.SFlatMapFunction2<K,V,R>
All Implemented Interfaces:
Serializable, org.apache.spark.api.java.function.FlatMapFunction2<K,V,R>

public abstract class SFlatMapFunction2<K,V,R>
extends DoFn<Pair<K,V>,R>
implements org.apache.spark.api.java.function.FlatMapFunction2<K,V,R>

A Crunch-compatible abstract base class for Spark's FlatMapFunction2. Subclasses of this class may be used against either Crunch PCollections or Spark RDDs.

See Also:
Serialized Form

Constructor Summary
SFlatMapFunction2()
           
 
Method Summary
 void process(Pair<K,V> input, Emitter<R> emitter)
          Processes the records from a PCollection.
 
Methods inherited from class org.apache.crunch.DoFn
cleanup, configure, disableDeepCopy, initialize, scaleFactor, setConfiguration, setContext
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.spark.api.java.function.FlatMapFunction2
call
 

Constructor Detail

SFlatMapFunction2

public SFlatMapFunction2()
Method Detail

process

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


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