org.apache.crunch.fn
Class SFlatMapFunction2<K,V,R>
java.lang.Object
org.apache.crunch.DoFn<Pair<K,V>,R>
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
Methods inherited from interface org.apache.spark.api.java.function.FlatMapFunction2 |
call |
SFlatMapFunction2
public SFlatMapFunction2()
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.