T
- Type of the input elements.O
- Type of the returned elements.@Public @FunctionalInterface public interface MapFunction<T,O> extends Function, Serializable
FlatMapFunction
.
The basic syntax for using a MapFunction is as follows:
DataSet<X> input = ...;
DataSet<Y> result = input.map(new MyMapFunction());
Modifier and Type | Method and Description |
---|---|
O |
map(T value)
The mapping method.
|
O map(T value) throws Exception
value
- The input value.Exception
- This method may throw exceptions. Throwing an exception will cause the
operation to fail and may trigger recovery.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.