|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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)
Called during the job planning phase. |
void |
initialize()
Called during the setup of the MapReduce job this DoFn is
associated with. |
Pair<S,T> |
map(Pair<K,V> input)
Maps the given input into an instance of the output type. |
void |
setConfigurationForTest(org.apache.hadoop.conf.Configuration conf)
Sets a Configuration instance to be used during unit tests. |
Methods inherited from class org.apache.crunch.MapFn |
---|
process, scaleFactor |
Methods inherited from class org.apache.crunch.DoFn |
---|
setContext |
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
configure
in class DoFn<Pair<K,V>,Pair<S,T>>
conf
- The Configuration instance for the Job.public void initialize()
DoFn
DoFn
is
associated with. Subclasses may override this method to do appropriate
initialization.
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 outputpublic void setConfigurationForTest(org.apache.hadoop.conf.Configuration conf)
DoFn
Configuration
instance to be used during unit tests.
setConfigurationForTest
in class DoFn<Pair<K,V>,Pair<S,T>>
conf
- The Configuration instance.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |