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