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,org.apache.flink.api.common.functions.Function,MapFunction<IN,OUT>,RichFunction
@Public public abstract class RichMapFunction<IN,OUT> extends AbstractRichFunction implements MapFunction<IN,OUT>
Rich variant of theMapFunction. As aRichFunction, it gives access to theRuntimeContextand 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 OUTmap(IN value)The mapping method.-
Methods inherited from class org.apache.flink.api.common.functions.AbstractRichFunction
close, getIterationRuntimeContext, getRuntimeContext, open, setRuntimeContext
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.api.common.functions.RichFunction
open
-
-
-
-
Method Detail
-
map
public abstract OUT map(IN value) throws Exception
Description copied from interface:MapFunctionThe mapping method. Takes an element from the input data set and transforms it into exactly one element.- Specified by:
mapin 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.
-
-