public abstract class MapKeysFn<K1,K2,V> extends DoFn<Pair<K1,V>,Pair<K2,V>>
Constructor and Description |
---|
MapKeysFn() |
Modifier and Type | Method and Description |
---|---|
abstract K2 |
map(K1 k1) |
void |
process(Pair<K1,V> input,
Emitter<Pair<K2,V>> emitter)
Processes the records from a
PCollection . |
cleanup, configure, initialize, scaleFactor, setContext
public void process(Pair<K1,V> input, Emitter<Pair<K2,V>> emitter)
DoFn
PCollection
.
DoFn.process(Object, Emitter)
method call. This
functionality is imposed by Hadoop's Reducer implementation: The framework will reuse the key and value
objects that are passed into the reduce, therefore the application should
clone the objects they want to keep a copy of.Copyright © 2013 The Apache Software Foundation. All Rights Reserved.