Class InternalSingleValueProcessWindowFunction<IN,OUT,KEY,W extends Window>
- java.lang.Object
-
- org.apache.flink.api.common.functions.AbstractRichFunction
-
- org.apache.flink.api.common.functions.WrappingFunction<ProcessWindowFunction<IN,OUT,KEY,W>>
-
- org.apache.flink.streaming.runtime.operators.windowing.functions.InternalSingleValueProcessWindowFunction<IN,OUT,KEY,W>
-
- All Implemented Interfaces:
Serializable
,Function
,RichFunction
,InternalWindowFunction<IN,OUT,KEY,W>
public final class InternalSingleValueProcessWindowFunction<IN,OUT,KEY,W extends Window> extends WrappingFunction<ProcessWindowFunction<IN,OUT,KEY,W>> implements InternalWindowFunction<IN,OUT,KEY,W>
Internal window function for wrapping aProcessWindowFunction
that takes anIterable
when the window state is a single value.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.flink.streaming.runtime.operators.windowing.functions.InternalWindowFunction
InternalWindowFunction.InternalWindowContext
-
-
Field Summary
-
Fields inherited from class org.apache.flink.api.common.functions.WrappingFunction
wrappedFunction
-
-
Constructor Summary
Constructors Constructor Description InternalSingleValueProcessWindowFunction(ProcessWindowFunction<IN,OUT,KEY,W> wrappedFunction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear(W window, InternalWindowFunction.InternalWindowContext context)
Deletes any state in theContext
when the Window expires (the watermark passes itsmaxTimestamp
+allowedLateness
).IterationRuntimeContext
getIterationRuntimeContext()
Gets a specialized version of theRuntimeContext
, which has additional information about the iteration in which the function is executed.RuntimeContext
getRuntimeContext()
Gets the context that contains information about the UDF's runtime, such as the parallelism of the function, the subtask index of the function, or the name of the task that executes the function.void
process(KEY key, W window, InternalWindowFunction.InternalWindowContext context, IN input, Collector<OUT> out)
Evaluates the window and outputs none or several elements.-
Methods inherited from class org.apache.flink.api.common.functions.WrappingFunction
close, getWrappedFunction, open, setRuntimeContext
-
-
-
-
Constructor Detail
-
InternalSingleValueProcessWindowFunction
public InternalSingleValueProcessWindowFunction(ProcessWindowFunction<IN,OUT,KEY,W> wrappedFunction)
-
-
Method Detail
-
process
public void process(KEY key, W window, InternalWindowFunction.InternalWindowContext context, IN input, Collector<OUT> out) throws Exception
Description copied from interface:InternalWindowFunction
Evaluates the window and outputs none or several elements.- Specified by:
process
in interfaceInternalWindowFunction<IN,OUT,KEY,W extends Window>
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(W window, InternalWindowFunction.InternalWindowContext context) throws Exception
Description copied from interface:InternalWindowFunction
Deletes any state in theContext
when the Window expires (the watermark passes itsmaxTimestamp
+allowedLateness
).
-
getRuntimeContext
public RuntimeContext getRuntimeContext()
Description copied from interface:RichFunction
Gets the context that contains information about the UDF's runtime, such as the parallelism of the function, the subtask index of the function, or the name of the task that executes the function.The RuntimeContext also gives access to the
Accumulator
s and theDistributedCache
.- Specified by:
getRuntimeContext
in interfaceRichFunction
- Overrides:
getRuntimeContext
in classAbstractRichFunction
- Returns:
- The UDF's runtime context.
-
getIterationRuntimeContext
public IterationRuntimeContext getIterationRuntimeContext()
Description copied from interface:RichFunction
Gets a specialized version of theRuntimeContext
, which has additional information about the iteration in which the function is executed. This IterationRuntimeContext is only available if the function is part of an iteration. Otherwise, this method throws an exception.- Specified by:
getIterationRuntimeContext
in interfaceRichFunction
- Overrides:
getIterationRuntimeContext
in classAbstractRichFunction
- Returns:
- The IterationRuntimeContext.
-
-