Class RichMapPartitionFunction<I,O>
- java.lang.Object
-
- org.apache.flink.api.common.functions.AbstractRichFunction
-
- org.apache.flink.api.common.functions.RichMapPartitionFunction<I,O>
-
- Type Parameters:
I
- Type of the input elements.O
- Type of the returned elements.
- All Implemented Interfaces:
Serializable
,Function
,MapPartitionFunction<I,O>
,RichFunction
- Direct Known Subclasses:
AssignRangeIndex
,RangeBoundaryBuilder
@Public public abstract class RichMapPartitionFunction<I,O> extends AbstractRichFunction implements MapPartitionFunction<I,O>
Rich variant of theMapPartitionFunction
. 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 RichMapPartitionFunction()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract void
mapPartition(Iterable<I> values, Collector<O> out)
A user-implemented function that modifies or transforms an incoming object.-
Methods inherited from class org.apache.flink.api.common.functions.AbstractRichFunction
close, getIterationRuntimeContext, getRuntimeContext, open, setRuntimeContext
-
-
-
-
Method Detail
-
mapPartition
public abstract void mapPartition(Iterable<I> values, Collector<O> out) throws Exception
Description copied from interface:MapPartitionFunction
A user-implemented function that modifies or transforms an incoming object.- Specified by:
mapPartition
in interfaceMapPartitionFunction<I,O>
- Parameters:
values
- All records for the mapperout
- The collector to hand results to.- Throws:
Exception
- This method may throw exceptions. Throwing an exception will cause the operation to fail and may trigger recovery.
-
-