Class RichFlatMapFunction<IN,OUT>
- java.lang.Object
-
- org.apache.flink.api.common.functions.AbstractRichFunction
-
- org.apache.flink.api.common.functions.RichFlatMapFunction<IN,OUT>
-
- Type Parameters:
IN
- Type of the input elements.OUT
- Type of the returned elements.
- All Implemented Interfaces:
Serializable
,FlatMapFunction<IN,OUT>
,Function
,RichFunction
- Direct Known Subclasses:
HadoopMapFunction
,SemanticsCheckMapper
,SlidingWindowCheckMapper
@Public public abstract class RichFlatMapFunction<IN,OUT> extends AbstractRichFunction implements FlatMapFunction<IN,OUT>
Rich variant of theFlatMapFunction
. As aRichFunction
, it gives access to theRuntimeContext
and provides setup and teardown methods:RichFunction.open(OpenContext)
andRichFunction.close()
.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RichFlatMapFunction()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract void
flatMap(IN value, Collector<OUT> out)
The core method of the FlatMapFunction.-
Methods inherited from class org.apache.flink.api.common.functions.AbstractRichFunction
close, getIterationRuntimeContext, getRuntimeContext, open, setRuntimeContext
-
-
-
-
Method Detail
-
flatMap
public abstract void flatMap(IN value, Collector<OUT> out) throws Exception
Description copied from interface:FlatMapFunction
The core method of the FlatMapFunction. Takes an element from the input data set and transforms it into zero, one, or more elements.- Specified by:
flatMap
in interfaceFlatMapFunction<IN,OUT>
- Parameters:
value
- The input value.out
- The collector for returning result values.- Throws:
Exception
- This method may throw exceptions. Throwing an exception will cause the operation to fail and may trigger recovery.
-
-