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>AbstractStreamOperator.CountingOutputallowedLateness, context, currentWatermark, inputSerializer, keySelector, keySerializer, mergingWindowsByKey, processingTimeTimerFutures, processingTimeTimers, processingTimeTimersQueue, processingTimeTimerTimestamps, timestampedCollector, trigger, watermarkTimers, watermarkTimersQueue, windowAssigner, windowAssignerContext, windowSerializeruserFunctionchainingStrategy, LOG, metrics, output| Constructor and Description |
|---|
EvictingWindowOperator(WindowAssigner<? super IN,W> windowAssigner,
org.apache.flink.api.common.typeutils.TypeSerializer<W> windowSerializer,
org.apache.flink.api.java.functions.KeySelector<IN,K> keySelector,
org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer,
org.apache.flink.api.common.state.StateDescriptor<? extends org.apache.flink.api.common.state.ListState<StreamRecord<IN>>,?> windowStateDescriptor,
InternalWindowFunction<Iterable<IN>,OUT,K,W> windowFunction,
Trigger<? super IN,? super W> trigger,
Evictor<? super IN,? super W> evictor,
long allowedLateness) |
| Modifier and Type | Method and Description |
|---|---|
Evictor<? super IN,? super W> |
getEvictor() |
org.apache.flink.api.common.state.StateDescriptor<? extends org.apache.flink.api.common.state.AppendingState<IN,Iterable<IN>>,?> |
getStateDescriptor() |
void |
processElement(StreamRecord<IN> element)
Processes one element that arrived at this operator.
|
void |
processWatermark(Watermark mark)
Processes a
Watermark. |
void |
trigger(long time)
This method is invoked with the timestamp for which the trigger was scheduled.
|
close, deleteCleanupTimer, dispose, getKeySelector, getMergingWindowSet, getTrigger, getWindowAssigner, isCleanupTime, isLate, open, registerCleanupTimer, restoreState, setInputType, snapshotOperatorStategetUserFunction, getUserFunctionParameters, notifyOfCompletedCheckpoint, setOutputType, setupgetChainingStrategy, getContainingTask, getCurrentProcessingTime, getExecutionConfig, getMetricGroup, getOperatorConfig, getPartitionedState, getPartitionedState, getRuntimeContext, getStateBackend, getUserCodeClassloader, registerTimer, setChainingStrategy, setKeyContext, setKeyContextElement1, setKeyContextElement2clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetChainingStrategy, getMetricGroup, notifyOfCompletedCheckpoint, setChainingStrategy, setKeyContextElement1, setKeyContextElement2, setuppublic EvictingWindowOperator(WindowAssigner<? super IN,W> windowAssigner, org.apache.flink.api.common.typeutils.TypeSerializer<W> windowSerializer, org.apache.flink.api.java.functions.KeySelector<IN,K> keySelector, org.apache.flink.api.common.typeutils.TypeSerializer<K> keySerializer, org.apache.flink.api.common.state.StateDescriptor<? extends org.apache.flink.api.common.state.ListState<StreamRecord<IN>>,?> windowStateDescriptor, InternalWindowFunction<Iterable<IN>,OUT,K,W> windowFunction, Trigger<? super IN,? super W> trigger, Evictor<? super IN,? super W> evictor, long allowedLateness)
public void processElement(StreamRecord<IN> element) throws Exception
OneInputStreamOperatorprocessElement in interface OneInputStreamOperator<IN,OUT>processElement in class WindowOperator<K,IN,Iterable<IN>,OUT,W extends Window>Exceptionpublic void processWatermark(Watermark mark) throws Exception
OneInputStreamOperatorWatermark.
This method is guaranteed to not be called concurrently with other methods of the operator.processWatermark in interface OneInputStreamOperator<IN,OUT>processWatermark in class WindowOperator<K,IN,Iterable<IN>,OUT,W extends Window>ExceptionWatermarkpublic void trigger(long time)
throws Exception
TriggerableIf the triggering is delayed for whatever reason (trigger timer was blocked, JVM stalled due to a garbage collection), the timestamp supplied to this function will still be the original timestamp for which the trigger was scheduled.
Copyright © 2014–2016 The Apache Software Foundation. All rights reserved.