public class FoldAllWindowFunction<W extends Window,T,R> extends org.apache.flink.api.java.operators.translation.WrappingFunction<FoldFunction<T,R>> implements AllWindowFunction<T,R,W>, OutputTypeConfigurable<R>
| Constructor and Description |
|---|
FoldAllWindowFunction(R initialValue,
FoldFunction<T,R> reduceFunction) |
| Modifier and Type | Method and Description |
|---|---|
void |
apply(W window,
Iterable<T> values,
Collector<R> out)
Evaluates the window and outputs none or several elements.
|
void |
open(Configuration configuration) |
void |
setOutputType(TypeInformation<R> outTypeInfo,
ExecutionConfig executionConfig)
Is called by the
StreamGraph.addOperator(Integer, StreamOperator, TypeInformation, TypeInformation, String)
method when the StreamGraph is generated. |
close, getWrappedFunction, setRuntimeContextgetIterationRuntimeContext, getRuntimeContextpublic FoldAllWindowFunction(R initialValue, FoldFunction<T,R> reduceFunction)
public void open(Configuration configuration) throws Exception
open in interface RichFunctionopen in class org.apache.flink.api.java.operators.translation.WrappingFunction<FoldFunction<T,R>>Exceptionpublic void apply(W window, Iterable<T> values, Collector<R> out) throws Exception
AllWindowFunctionapply in interface AllWindowFunction<T,R,W extends Window>window - The window that is being evaluated.values - 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 setOutputType(TypeInformation<R> outTypeInfo, ExecutionConfig executionConfig)
OutputTypeConfigurableStreamGraph.addOperator(Integer, StreamOperator, TypeInformation, TypeInformation, String)
method when the StreamGraph is generated. The
method is called with the output TypeInformation which is also used for the
StreamTask output serializer.setOutputType in interface OutputTypeConfigurable<R>outTypeInfo - Output type information of the StreamTaskexecutionConfig - Execution configurationCopyright © 2014–2016 The Apache Software Foundation. All rights reserved.