I - type of input receivedO - type of intermediate values producedpublic abstract class MapOnlyMapper<I,O> extends Worker<C>
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 |
|---|
MapOnlyMapper() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
emit(O value)
Syntactic sugar for
getContext().emit(value) |
static <I,Void,V> MapOnlyMapper<I,V> |
forMapper(Mapper<I,Void,V> mapper)
Returns a MapOnlyMapper for a given Mapper passing only the values to the output.
|
abstract void |
map(I value)
Processes a single input value, emitting output through the context returned by
Worker.getContext() or emit(O). |
allowSliceRetry, beginShard, beginSlice, endShard, endSlice, estimateMemoryRequirement, getContext, setContextpublic static <I,Void,V> MapOnlyMapper<I,V> forMapper(Mapper<I,Void,V> mapper)
public abstract void map(I value)
Worker.getContext() or emit(O).protected void emit(O value)
getContext().emit(value)Copyright © 2015 Google. All rights reserved.