T
- The type of the filtered elements.@Public public abstract class RichFilterFunction<T> extends AbstractRichFunction implements FilterFunction<T>
FilterFunction
. As a RichFunction
, it gives access to the
RuntimeContext
and provides setup and teardown
methods: RichFunction.open(org.apache.flink.configuration.Configuration)
and RichFunction.close()
.Constructor and Description |
---|
RichFilterFunction() |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
filter(T value)
The filter function that evaluates the predicate.
|
close, getIterationRuntimeContext, getRuntimeContext, open, setRuntimeContext
public abstract boolean filter(T value) throws Exception
FilterFunction
IMPORTANT: The system assumes that the function does not modify the elements on which the predicate is applied. Violating this assumption can lead to incorrect results.
filter
in interface FilterFunction<T>
value
- The value to be filtered.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.