K - type of intermediate keys receivedV - type of intermediate values receivedO - type of output values producedpublic abstract class Reducer<K,V,O> extends Worker<ReducerContext<O>>
This class is really an interface that might be evolving. In order to avoid breaking users when we change the interface, we made it an abstract class.
| Constructor and Description |
|---|
Reducer() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
emit(O value)
Syntactic sugar for
getContext().emit(value) |
abstract void |
reduce(K key,
ReducerInput<V> values)
Processes the values for a given key, using the context returned by
Worker.getContext() to emit output to the Output of the MapReduce. |
allowSliceRetry, beginShard, beginSlice, endShard, endSlice, estimateMemoryRequirement, getContext, setContextpublic abstract void reduce(K key, ReducerInput<V> values)
Worker.getContext() to emit output to the Output of the MapReduce.
values enumerates all values that the map phase produced for the
key key. It will always contain at least one value.protected void emit(O value)
getContext().emit(value)Copyright © 2015 Google. All rights reserved.