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