public abstract class SFlatMapFunction<T,R> extends DoFn<T,R> implements org.apache.spark.api.java.function.FlatMapFunction<T,R>
FlatMapFunction. Subclasses
 of this class may be used against either Crunch PCollections or Spark RDDs.| Constructor and Description | 
|---|
| SFlatMapFunction() | 
| Modifier and Type | Method and Description | 
|---|---|
| void | cleanup(Emitter<R> emitter)Called during the cleanup of the MapReduce job this  DoFnis
 associated with. | 
| void | initialize()Initialize this DoFn. | 
| void | process(T input,
       Emitter<R> emitter)Processes the records from a  PCollection. | 
configure, disableDeepCopy, scaleFactor, setConfiguration, setContextpublic void process(T input, Emitter<R> emitter)
DoFnPCollection.
 
 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.public final void initialize()
DoFnDoFn.process(Object, Emitter) is triggered. Subclasses may override
 this method to do appropriate initialization.
 
 
 Called during the setup of the job instance this DoFn is associated
 with.
 
initialize in class DoFn<T,R>Copyright © 2017 The Apache Software Foundation. All rights reserved.