public class KeyedScottyWindowOperator<Key,InputType,FinalAggregateType> extends org.apache.flink.streaming.api.functions.KeyedProcessFunction<Key,InputType,AggregateWindow<FinalAggregateType>>
| Modifier and Type | Field and Description |
|---|---|
private long |
lastWatermark |
private java.util.HashMap<Key,SlicingWindowOperator<InputType>> |
slicingWindowOperatorMap |
private MemoryStateFactory |
stateFactory |
private AggregateFunction<InputType,?,FinalAggregateType> |
windowFunction |
private java.util.List<Window> |
windows |
| Constructor and Description |
|---|
KeyedScottyWindowOperator(AggregateFunction<InputType,?,FinalAggregateType> windowFunction) |
| Modifier and Type | Method and Description |
|---|---|
void |
addWindow(Window window)
Register a new @
Window definition to the ActiveWindow Operator. |
Key |
getKey(org.apache.flink.streaming.api.functions.KeyedProcessFunction.Context ctx) |
SlicingWindowOperator<InputType> |
initWindowOperator() |
void |
open(org.apache.flink.configuration.Configuration parameters) |
void |
processElement(InputType value,
org.apache.flink.streaming.api.functions.KeyedProcessFunction.Context ctx,
org.apache.flink.util.Collector<AggregateWindow<FinalAggregateType>> out) |
private void |
processWatermark(org.apache.flink.streaming.api.functions.KeyedProcessFunction.Context ctx,
org.apache.flink.util.Collector<AggregateWindow<FinalAggregateType>> out) |
private MemoryStateFactory stateFactory
private java.util.HashMap<Key,SlicingWindowOperator<InputType>> slicingWindowOperatorMap
private long lastWatermark
private final AggregateFunction<InputType,?,FinalAggregateType> windowFunction
private final java.util.List<Window> windows
public KeyedScottyWindowOperator(AggregateFunction<InputType,?,FinalAggregateType> windowFunction)
public void open(org.apache.flink.configuration.Configuration parameters)
throws java.lang.Exception
open in interface org.apache.flink.api.common.functions.RichFunctionopen in class org.apache.flink.api.common.functions.AbstractRichFunctionjava.lang.Exceptionpublic SlicingWindowOperator<InputType> initWindowOperator()
public Key getKey(org.apache.flink.streaming.api.functions.KeyedProcessFunction.Context ctx)
public void processElement(InputType value, org.apache.flink.streaming.api.functions.KeyedProcessFunction.Context ctx, org.apache.flink.util.Collector<AggregateWindow<FinalAggregateType>> out) throws java.lang.Exception
processElement in class org.apache.flink.streaming.api.functions.KeyedProcessFunction<Key,InputType,AggregateWindow<FinalAggregateType>>java.lang.Exceptionprivate void processWatermark(org.apache.flink.streaming.api.functions.KeyedProcessFunction.Context ctx,
org.apache.flink.util.Collector<AggregateWindow<FinalAggregateType>> out)
public void addWindow(Window window)
Window definition to the ActiveWindow Operator.
For example SlidingWindow or TumblingWindowwindow - the new window definition