I
- input typeO
- output typepublic static class GraphUtils.MapTo<I,O> extends Object implements org.apache.flink.api.common.functions.MapFunction<I,O>, org.apache.flink.api.java.typeutils.ResultTypeQueryable<O>, TranslateFunction<I,O>
Constructor and Description |
---|
MapTo(O value)
Map each element to the given object.
|
Modifier and Type | Method and Description |
---|---|
org.apache.flink.api.common.typeinfo.TypeInformation<O> |
getProducedType() |
O |
map(I input) |
O |
translate(I input,
O reuse)
The translating method.
|
public MapTo(O value)
value
- the object to emit for each elementpublic O translate(I input, O reuse) throws Exception
TranslateFunction
translate
in interface TranslateFunction<I,O>
input
- input value.reuse
- value which may be reused for output; if reuse is null then a new output object
must be instantiated and returnedException
- This method may throw exceptions. Throwing an exception will cause the operation
to fail and may trigger recovery.Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.