I
- Type of the input elements.O
- Type of the returned elements.@Public public abstract class RichMapPartitionFunction<I,O> extends AbstractRichFunction implements MapPartitionFunction<I,O>
MapPartitionFunction
. As a RichFunction
, it gives access to
the RuntimeContext
and provides setup and teardown
methods: RichFunction.open(OpenContext)
and RichFunction.close()
.Constructor and Description |
---|
RichMapPartitionFunction() |
Modifier and Type | Method and Description |
---|---|
abstract void |
mapPartition(Iterable<I> values,
Collector<O> out)
A user-implemented function that modifies or transforms an incoming object.
|
close, getIterationRuntimeContext, getRuntimeContext, open, setRuntimeContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
open
public abstract void mapPartition(Iterable<I> values, Collector<O> out) throws Exception
MapPartitionFunction
mapPartition
in interface MapPartitionFunction<I,O>
values
- All records for the mapperout
- The collector to hand results to.Exception
- This method may throw exceptions. Throwing an exception will cause the
operation to fail and may trigger recovery.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.