T
- Type of the input elements.O
- Type of the returned elements.@Public public interface MapPartitionFunction<T,O> extends Function, Serializable
This function is intended to provide enhanced flexibility in the processing of elements in a partition.
For most of the simple use cases, consider using the MapFunction
or FlatMapFunction
.
The basic syntax for a MapPartitionFunction is as follows:
DataSet<X> input = ...;
DataSet<Y> result = input.mapPartition(new MyMapPartitionFunction());
Modifier and Type | Method and Description |
---|---|
void |
mapPartition(Iterable<T> values,
Collector<O> out)
A user-implemented function that modifies or transforms an incoming object.
|
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.