Class EvictingWindowReaderFunction<IN,R,OUT,KEY,W extends org.apache.flink.streaming.api.windowing.windows.Window>
java.lang.Object
org.apache.flink.api.common.functions.AbstractRichFunction
org.apache.flink.state.api.functions.WindowReaderFunction<org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN>,OUT,KEY,W>
org.apache.flink.state.api.input.operator.window.EvictingWindowReaderFunction<IN,R,OUT,KEY,W>
- Type Parameters:
IN- The input type stored in state.R- The aggregated type.OUT- The output type of the reader function.KEY- The key type.W- The window type.
- All Implemented Interfaces:
Serializable,org.apache.flink.api.common.functions.Function,org.apache.flink.api.common.functions.RichFunction
- Direct Known Subclasses:
AggregateEvictingWindowReaderFunction,ProcessEvictingWindowReader,ReduceEvictingWindowReaderFunction
@Internal
public abstract class EvictingWindowReaderFunction<IN,R,OUT,KEY,W extends org.apache.flink.streaming.api.windowing.windows.Window>
extends WindowReaderFunction<org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN>,OUT,KEY,W>
Wrapper for reading state from an evicting window operator.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.flink.state.api.functions.WindowReaderFunction
WindowReaderFunction.Context<W extends org.apache.flink.streaming.api.windowing.windows.Window> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEvictingWindowReaderFunction(WindowReaderFunction<R, OUT, KEY, W> wrappedFunction) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidopen(org.apache.flink.api.common.functions.OpenContext openContext) voidreadWindow(KEY key, WindowReaderFunction.Context<W> context, Iterable<org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN>> elements, org.apache.flink.util.Collector<OUT> out) Evaluates the window and outputs none or several elements.voidsetRuntimeContext(org.apache.flink.api.common.functions.RuntimeContext t) Methods inherited from class org.apache.flink.api.common.functions.AbstractRichFunction
getIterationRuntimeContext, getRuntimeContext
-
Constructor Details
-
EvictingWindowReaderFunction
-
-
Method Details
-
open
- Specified by:
openin interfaceorg.apache.flink.api.common.functions.RichFunction- Overrides:
openin classorg.apache.flink.api.common.functions.AbstractRichFunction- Throws:
Exception
-
close
- Specified by:
closein interfaceorg.apache.flink.api.common.functions.RichFunction- Overrides:
closein classorg.apache.flink.api.common.functions.AbstractRichFunction- Throws:
Exception
-
setRuntimeContext
public void setRuntimeContext(org.apache.flink.api.common.functions.RuntimeContext t) - Specified by:
setRuntimeContextin interfaceorg.apache.flink.api.common.functions.RichFunction- Overrides:
setRuntimeContextin classorg.apache.flink.api.common.functions.AbstractRichFunction
-
readWindow
public void readWindow(KEY key, WindowReaderFunction.Context<W> context, Iterable<org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN>> elements, org.apache.flink.util.Collector<OUT> out) throws Exception Description copied from class:WindowReaderFunctionEvaluates the window and outputs none or several elements.- Specified by:
readWindowin classWindowReaderFunction<org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN>,OUT, KEY, W extends org.apache.flink.streaming.api.windowing.windows.Window> - Parameters:
key- The key for which this window is evaluated.context- The context in which the window is being evaluated.elements- The elements in the window being evaluated.out- A collector for emitting elements.- Throws:
Exception- The function may throw exceptions to fail the program and trigger recovery.
-
transform
public abstract Iterable<R> transform(Iterable<org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN>> elements) throws Exception - Throws:
Exception
-