Class RichFilterFunction<T>
- java.lang.Object
-
- org.apache.flink.api.common.functions.AbstractRichFunction
-
- org.apache.flink.api.common.functions.RichFilterFunction<T>
-
- Type Parameters:
T- The type of the filtered elements.
- All Implemented Interfaces:
Serializable,FilterFunction<T>,org.apache.flink.api.common.functions.Function,RichFunction
@Public public abstract class RichFilterFunction<T> extends AbstractRichFunction implements FilterFunction<T>
Rich variant of theFilterFunction. As aRichFunction, it gives access to theRuntimeContextand provides setup and teardown methods:RichFunction.open(OpenContext)andRichFunction.close().- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RichFilterFunction()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract booleanfilter(T value)The filter function that evaluates the predicate.-
Methods inherited from class org.apache.flink.api.common.functions.AbstractRichFunction
close, getIterationRuntimeContext, getRuntimeContext, open, setRuntimeContext
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.api.common.functions.RichFunction
open
-
-
-
-
Method Detail
-
filter
public abstract boolean filter(T value) throws Exception
Description copied from interface:FilterFunctionThe filter function that evaluates the predicate.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.
- Specified by:
filterin interfaceFilterFunction<T>- Parameters:
value- The value to be filtered.- Returns:
- True for values that should be retained, false for values to be filtered out.
- Throws:
Exception- This method may throw exceptions. Throwing an exception will cause the operation to fail and may trigger recovery.
-
-