Class ReduceApplyProcessWindowFunction<K,W extends Window,T,R>
- java.lang.Object
-
- org.apache.flink.api.common.functions.AbstractRichFunction
-
- org.apache.flink.streaming.api.functions.windowing.ProcessWindowFunction<T,R,K,W>
-
- org.apache.flink.streaming.api.functions.windowing.ReduceApplyProcessWindowFunction<K,W,T,R>
-
- All Implemented Interfaces:
Serializable
,org.apache.flink.api.common.functions.Function
,org.apache.flink.api.common.functions.RichFunction
@Internal public class ReduceApplyProcessWindowFunction<K,W extends Window,T,R> extends ProcessWindowFunction<T,R,K,W>
InternalProcessWindowFunction
that is used for implementing a fold on a window configuration that only allowsAllWindowFunction
and cannot directly execute aReduceFunction
.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.flink.streaming.api.functions.windowing.ProcessWindowFunction
ProcessWindowFunction.Context
-
-
Constructor Summary
Constructors Constructor Description ReduceApplyProcessWindowFunction(org.apache.flink.api.common.functions.ReduceFunction<T> reduceFunction, ProcessWindowFunction<T,R,K,W> windowFunction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear(ProcessWindowFunction.Context context)
Deletes any state in theContext
when the Window expires (the watermark passes itsmaxTimestamp
+allowedLateness
).void
close()
void
open(org.apache.flink.api.common.functions.OpenContext openContext)
void
process(K k, ProcessWindowFunction.Context context, Iterable<T> input, org.apache.flink.util.Collector<R> out)
Evaluates the window and outputs none or several elements.void
setRuntimeContext(org.apache.flink.api.common.functions.RuntimeContext t)
-
-
-
Method Detail
-
process
public void process(K k, ProcessWindowFunction.Context context, Iterable<T> input, org.apache.flink.util.Collector<R> out) throws Exception
Description copied from class:ProcessWindowFunction
Evaluates the window and outputs none or several elements.- Specified by:
process
in classProcessWindowFunction<T,R,K,W extends Window>
- Parameters:
k
- The key for which this window is evaluated.context
- The context in which the window is being evaluated.input
- 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.
-
clear
public void clear(ProcessWindowFunction.Context context) throws Exception
Description copied from class:ProcessWindowFunction
Deletes any state in theContext
when the Window expires (the watermark passes itsmaxTimestamp
+allowedLateness
).
-
open
public void open(org.apache.flink.api.common.functions.OpenContext openContext) throws Exception
- Specified by:
open
in interfaceorg.apache.flink.api.common.functions.RichFunction
- Overrides:
open
in classorg.apache.flink.api.common.functions.AbstractRichFunction
- Throws:
Exception
-
close
public void close() throws Exception
- Specified by:
close
in interfaceorg.apache.flink.api.common.functions.RichFunction
- Overrides:
close
in classorg.apache.flink.api.common.functions.AbstractRichFunction
- Throws:
Exception
-
setRuntimeContext
public void setRuntimeContext(org.apache.flink.api.common.functions.RuntimeContext t)
- Specified by:
setRuntimeContext
in interfaceorg.apache.flink.api.common.functions.RichFunction
- Overrides:
setRuntimeContext
in classorg.apache.flink.api.common.functions.AbstractRichFunction
-
-