public class ExtractKeyFn<K,V> extends MapFn<V,Pair<K,V>>
MapFn
into a key-value pair that is
used to convert from a PCollection<V>
to a PTable<K, V>
.Constructor and Description |
---|
ExtractKeyFn(MapFn<V,K> mapFn) |
Modifier and Type | Method and Description |
---|---|
void |
initialize()
Initialize this DoFn.
|
Pair<K,V> |
map(V input)
Maps the given input into an instance of the output type.
|
void |
setContext(org.apache.hadoop.mapreduce.TaskInputOutputContext<?,?,?,?> context)
Called during setup to pass the
TaskInputOutputContext to this
DoFn instance. |
process, scaleFactor
public void setContext(org.apache.hadoop.mapreduce.TaskInputOutputContext<?,?,?,?> context)
DoFn
TaskInputOutputContext
to this
DoFn
instance.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.
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.