public static class MapSpecification.Builder<I,O,R> extends Object
Modifier and Type | Field and Description |
---|---|
protected Input<? extends I> |
input |
protected String |
jobName |
protected Output<? super O,? extends R> |
output |
Constructor and Description |
---|
MapSpecification.Builder() |
MapSpecification.Builder(Input<I> input,
MapOnlyMapper<I,O> mapper,
Output<O,R> output) |
MapSpecification.Builder(Input<I> input,
MapOnlyMapper<I,Void> mapper)
A builder for map job using
NoOutput as output. |
Modifier and Type | Method and Description |
---|---|
MapSpecification<I,O,R> |
build() |
protected MapSpecification.Builder<I,O,R> |
self() |
B |
setInput(Input<? extends I> input) |
B |
setJobName(String jobName) |
MapSpecification.Builder<I,O,R> |
setMapper(MapOnlyMapper<? extends I,O> mapper) |
MapSpecification.Builder<I,O,R> |
setMapper(Mapper<? extends I,Void,O> mapper)
A convenience method that wraps the given
mapper using
MapOnlyMapper.forMapper(Mapper) . |
B |
setOutput(Output<? super O,? extends R> output) |
protected String jobName
protected Input<? extends I> input
protected Output<? super O,? extends R> output
public MapSpecification.Builder()
public MapSpecification.Builder(Input<I> input, MapOnlyMapper<I,Void> mapper)
NoOutput
as output.protected MapSpecification.Builder<I,O,R> self()
public MapSpecification.Builder<I,O,R> setMapper(MapOnlyMapper<? extends I,O> mapper)
mapper
- processes the input and optionally generates output valuepublic MapSpecification.Builder<I,O,R> setMapper(Mapper<? extends I,Void,O> mapper)
mapper
using
MapOnlyMapper.forMapper(Mapper)
.public MapSpecification<I,O,R> build()
public B setJobName(String jobName)
jobName
- descriptive name for the job (human readable, does not have to be unique).public B setInput(Input<? extends I> input)
input
- specifies what input the mapper should processpublic B setOutput(Output<? super O,? extends R> output)
output
- specifies what to do with output values.Copyright © 2015 Google. All rights reserved.