K
- The type of key returned by the KeySelector
.IN
- The type of the incoming elements.OUT
- The type of elements emitted by the InternalWindowFunction
.W
- The type of Window
that the WindowAssigner
assigns.@Internal public class EvictingWindowOperator<K,IN,OUT,W extends Window> extends WindowOperator<K,IN,Iterable<IN>,OUT,W>
WindowOperator
that also allows an Evictor
to be used.
The Evictor
is used to evict elements from panes before processing a window and after
a Trigger
has fired.
WindowOperator.Context, WindowOperator.Timer<K,W extends Window>
context, currentWatermark, inputSerializer, keySelector, keySerializer, processingTimeTimers, processingTimeTimersQueue, timestampedCollector, trigger, watermarkTimers, watermarkTimersQueue, windowAssigner, windowSerializer
userFunction
chainingStrategy, LOG, output
Constructor and Description |
---|
EvictingWindowOperator(WindowAssigner<? super IN,W> windowAssigner,
TypeSerializer<W> windowSerializer,
KeySelector<IN,K> keySelector,
TypeSerializer<K> keySerializer,
StateDescriptor<? extends ListState<StreamRecord<IN>>,?> windowStateDescriptor,
InternalWindowFunction<Iterable<IN>,OUT,K,W> windowFunction,
Trigger<? super IN,? super W> trigger,
Evictor<? super IN,? super W> evictor) |
Modifier and Type | Method and Description |
---|---|
Evictor<? super IN,? super W> |
getEvictor() |
StateDescriptor<? extends MergingState<IN,Iterable<IN>>,?> |
getStateDescriptor() |
void |
processElement(StreamRecord<IN> element)
Processes one element that arrived at this operator.
|
protected void |
processTriggerResult(TriggerResult triggerResult,
K key,
W window) |
close, getKeySelector, getTrigger, getWindowAssigner, open, processWatermark, restoreState, setInputType, snapshotOperatorState, trigger
dispose, getUserFunction, getUserFunctionParameters, notifyOfCompletedCheckpoint, setOutputType, setup
disableInputCopy, getChainingStrategy, getContainingTask, getExecutionConfig, getOperatorConfig, getPartitionedState, getPartitionedState, getRuntimeContext, getStateBackend, getUserCodeClassloader, isInputCopyingDisabled, registerTimer, setChainingStrategy, setKeyContext, setKeyContextElement1, setKeyContextElement2
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
dispose, getChainingStrategy, isInputCopyingDisabled, notifyOfCompletedCheckpoint, setChainingStrategy, setKeyContextElement1, setKeyContextElement2, setup
public EvictingWindowOperator(WindowAssigner<? super IN,W> windowAssigner, TypeSerializer<W> windowSerializer, KeySelector<IN,K> keySelector, TypeSerializer<K> keySerializer, StateDescriptor<? extends ListState<StreamRecord<IN>>,?> windowStateDescriptor, InternalWindowFunction<Iterable<IN>,OUT,K,W> windowFunction, Trigger<? super IN,? super W> trigger, Evictor<? super IN,? super W> evictor)
public void processElement(StreamRecord<IN> element) throws Exception
OneInputStreamOperator
processElement
in interface OneInputStreamOperator<IN,OUT>
processElement
in class WindowOperator<K,IN,Iterable<IN>,OUT,W extends Window>
Exception
protected void processTriggerResult(TriggerResult triggerResult, K key, W window) throws Exception
processTriggerResult
in class WindowOperator<K,IN,Iterable<IN>,OUT,W extends Window>
Exception
public StateDescriptor<? extends MergingState<IN,Iterable<IN>>,?> getStateDescriptor()
getStateDescriptor
in class WindowOperator<K,IN,Iterable<IN>,OUT,W extends Window>
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.