public abstract class SFunction2<K,V,R> extends MapFn<T,R> implements org.apache.spark.api.java.function.Function2<K,V,R>
Function2. Subclasses
of this class may be used against either Crunch PCollections or Spark RDDs.| Constructor and Description |
|---|
SFunction2() |
| 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.
|
R |
map(Pair<K,V> input)
Maps the given input into an instance of the output type.
|
process, scaleFactorconfigure, disableDeepCopy, setConfiguration, setContextpublic R map(Pair<K,V> input)
MapFnpublic 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.