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, scaleFactor
configure, disableDeepCopy, setConfiguration, setContext
public R map(Pair<K,V> input)
MapFn
public final void initialize()
DoFn
DoFn.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 © 2016 The Apache Software Foundation. All rights reserved.