Class RichMapFunction<IN,OUT>
- java.lang.Object
-
- org.apache.flink.api.common.functions.AbstractRichFunction
-
- org.apache.flink.api.common.functions.RichMapFunction<IN,OUT>
-
- Type Parameters:
IN
- Type of the input elements.OUT
- Type of the returned elements.
- All Implemented Interfaces:
Serializable
,Function
,MapFunction<IN,OUT>
,RichFunction
- Direct Known Subclasses:
ArtificalOperatorStateMapper
,ArtificialKeyedStateMapper
,FailureMapper
,StatefulStreamingJob.MyStatefulFunction
@Public public abstract class RichMapFunction<IN,OUT> extends AbstractRichFunction implements MapFunction<IN,OUT>
Rich variant of theMapFunction
. 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 RichMapFunction()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract OUT
map(IN value)
The mapping method.-
Methods inherited from class org.apache.flink.api.common.functions.AbstractRichFunction
close, getIterationRuntimeContext, getRuntimeContext, open, setRuntimeContext
-
-
-
-
Method Detail
-
map
public abstract OUT map(IN value) throws Exception
Description copied from interface:MapFunction
The mapping method. Takes an element from the input data set and transforms it into exactly one element.- Specified by:
map
in interfaceMapFunction<IN,OUT>
- Parameters:
value
- The input value.- Returns:
- The transformed value
- Throws:
Exception
- This method may throw exceptions. Throwing an exception will cause the operation to fail and may trigger recovery.
-
-