public abstract class SPairFlatMapFunction<T,K,V> extends DoFn<T,R> implements org.apache.spark.api.java.function.PairFlatMapFunction<T,K,V>
PairFlatMapFunction. Subclasses
of this class may be used against either Crunch PCollections or Spark RDDs.| Constructor and Description |
|---|
SPairFlatMapFunction() |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup(Emitter<R> emitter)
Called during the cleanup of the MapReduce job this
DoFn is
associated with. |
void |
initialize()
Initialize this DoFn.
|
void |
process(T input,
Emitter<Pair<K,V>> emitter)
Processes the records from a
PCollection. |
configure, disableDeepCopy, scaleFactor, setConfiguration, setContextpublic void process(T input, Emitter<Pair<K,V>> 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 © 2015 The Apache Software Foundation. All Rights Reserved.