@Internal public class ReduceApplyProcessWindowFunction<K,W extends Window,T,R> extends ProcessWindowFunction<T,R,K,W>
ProcessWindowFunction
that is used for implementing a fold on a window
configuration that only allows AllWindowFunction
and cannot directly execute a ReduceFunction
.ProcessWindowFunction.Context
Constructor and Description |
---|
ReduceApplyProcessWindowFunction(org.apache.flink.api.common.functions.ReduceFunction<T> reduceFunction,
ProcessWindowFunction<T,R,K,W> windowFunction) |
Modifier and Type | Method and Description |
---|---|
void |
clear(ProcessWindowFunction.Context context)
Deletes any state in the
Context when the Window expires (the watermark passes its
maxTimestamp + allowedLateness ). |
void |
close() |
void |
open(org.apache.flink.configuration.Configuration configuration) |
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) |
public void process(K k, ProcessWindowFunction.Context context, Iterable<T> input, org.apache.flink.util.Collector<R> out) throws Exception
ProcessWindowFunction
process
in class ProcessWindowFunction<T,R,K,W extends Window>
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.Exception
- The function may throw exceptions to fail the program and trigger recovery.public void clear(ProcessWindowFunction.Context context) throws Exception
ProcessWindowFunction
Context
when the Window expires (the watermark passes its
maxTimestamp
+ allowedLateness
).public void open(org.apache.flink.configuration.Configuration configuration) throws Exception
open
in interface org.apache.flink.api.common.functions.RichFunction
open
in class org.apache.flink.api.common.functions.AbstractRichFunction
Exception
public void close() throws Exception
close
in interface org.apache.flink.api.common.functions.RichFunction
close
in class org.apache.flink.api.common.functions.AbstractRichFunction
Exception
public void setRuntimeContext(org.apache.flink.api.common.functions.RuntimeContext t)
setRuntimeContext
in interface org.apache.flink.api.common.functions.RichFunction
setRuntimeContext
in class org.apache.flink.api.common.functions.AbstractRichFunction
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.