IN
- Type of the input elements.OUT
- Type of the returned elements.@PublicEvolving public abstract class FlatMapIterator<IN,OUT> extends RichFlatMapFunction<IN,OUT>
RichFlatMapFunction
that returns elements through an iterator, rather then through a collector. In all other
respects, it behaves exactly like the FlatMapFunction.
The function needs to be serializable, as defined in Serializable
.
Constructor and Description |
---|
FlatMapIterator() |
Modifier and Type | Method and Description |
---|---|
abstract Iterator<OUT> |
flatMap(IN value)
The core method of the function.
|
void |
flatMap(IN value,
Collector<OUT> out)
Delegates calls to the
flatMap(Object) method. |
close, getIterationRuntimeContext, getRuntimeContext, open, setRuntimeContext
public abstract Iterator<OUT> flatMap(IN value) throws Exception
value
- The input value.Exception
- This method may throw exceptions. Throwing an exception will cause the
operation to fail and may trigger recovery.public final void flatMap(IN value, Collector<OUT> out) throws Exception
flatMap(Object)
method.flatMap
in interface FlatMapFunction<IN,OUT>
flatMap
in class RichFlatMapFunction<IN,OUT>
value
- The input value.out
- The collector for returning result values.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.