|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.crunch.DoFn<S,T> org.apache.crunch.MapFn<Pair<K,V>,Pair<S,T>> org.apache.crunch.fn.PairMapFn<K,V,S,T>
public class PairMapFn<K,V,S,T>
Constructor Summary | |
---|---|
PairMapFn(MapFn<K,S> keys,
MapFn<V,T> values)
|
Method Summary | |
---|---|
void |
cleanup(Emitter<Pair<S,T>> emitter)
Called during the cleanup of the MapReduce job this DoFn is
associated with. |
void |
configure(org.apache.hadoop.conf.Configuration conf)
Configure this DoFn. |
void |
initialize()
Initialize this DoFn. |
Pair<S,T> |
map(Pair<K,V> input)
Maps the given input into an instance of the output type. |
void |
setConfiguration(org.apache.hadoop.conf.Configuration conf)
Called during the setup of an initialized PType that
relies on this instance. |
void |
setContext(org.apache.hadoop.mapreduce.TaskInputOutputContext<?,?,?,?> context)
Called during setup to pass the TaskInputOutputContext to this
DoFn instance. |
Methods inherited from class org.apache.crunch.MapFn |
---|
process, scaleFactor |
Methods inherited from class org.apache.crunch.DoFn |
---|
disableDeepCopy |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PairMapFn(MapFn<K,S> keys, MapFn<V,T> values)
Method Detail |
---|
public void configure(org.apache.hadoop.conf.Configuration conf)
DoFn
Called during the job planning phase by the crunch-client.
configure
in class DoFn<Pair<K,V>,Pair<S,T>>
conf
- The Configuration instance for the Job.public void setConfiguration(org.apache.hadoop.conf.Configuration conf)
DoFn
PType
that
relies on this instance.
setConfiguration
in class DoFn<Pair<K,V>,Pair<S,T>>
conf
- The configuration for the PType
being initializedpublic void setContext(org.apache.hadoop.mapreduce.TaskInputOutputContext<?,?,?,?> context)
DoFn
TaskInputOutputContext
to this
DoFn
instance.
setContext
in class DoFn<Pair<K,V>,Pair<S,T>>
public 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<Pair<K,V>,Pair<S,T>>
public Pair<S,T> map(Pair<K,V> input)
MapFn
map
in class MapFn<Pair<K,V>,Pair<S,T>>
public void cleanup(Emitter<Pair<S,T>> emitter)
DoFn
DoFn
is
associated with. Subclasses may override this method to do appropriate
cleanup.
cleanup
in class DoFn<Pair<K,V>,Pair<S,T>>
emitter
- The emitter that was used for output
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |