K
- The type of key returned by the KeySelector
.W
- The type of Window
that the WindowAssigner
assigns.public class TableAggregateWindowOperator<K,W extends Window> extends WindowOperator<K,W>
WindowOperator
for grouped and windowed table aggregates.
When an element arrives it gets assigned a key using a KeySelector
and it gets
assigned to zero or more windows using a WindowAssigner
. Based on this, the element
is put into panes. A pane is the bucket of elements that have the same key and same
Window
. An element can be in multiple panes if it was assigned to multiple windows by
the WindowAssigner
.
Each pane gets its own instance of the provided Trigger
. This trigger determines when
the contents of the pane should be processed to emit results. When a trigger fires,
the given NamespaceTableAggsHandleFunction.emitValue(Object, BaseRow, Collector)
is invoked to produce the results that are emitted for the pane to which the Trigger
belongs.
AbstractStreamOperator.CountingOutput<OUT>
collector, previousState, sendRetraction, windowAggregator, windowFunction
chainingStrategy, config, latencyStats, LOG, metrics, output, timeServiceManager
Modifier and Type | Method and Description |
---|---|
protected void |
compileGeneratedCode() |
protected void |
emitWindowResult(W window)
Emits the window result of the given window.
|
close, dispose, getNumLateRecordsDropped, getWatermarkLatency, onEventTime, onProcessingTime, open, processElement
getChainingStrategy, getContainingTask, getCurrentKey, getExecutionConfig, getInternalTimerService, getKeyedStateBackend, getKeyedStateStore, getMetricGroup, getOperatorConfig, getOperatorID, getOperatorName, getOperatorStateBackend, getOrCreateKeyedState, getPartitionedState, getPartitionedState, getProcessingTimeService, getRuntimeContext, getUserCodeClassloader, initializeState, initializeState, notifyCheckpointComplete, numEventTimeTimers, numProcessingTimeTimers, prepareSnapshotPreBarrier, processLatencyMarker, processLatencyMarker1, processLatencyMarker2, processWatermark, processWatermark1, processWatermark2, reportOrForwardLatencyMarker, setChainingStrategy, setCurrentKey, setKeyContextElement1, setKeyContextElement2, setup, snapshotState, snapshotState
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
processLatencyMarker, processWatermark
getChainingStrategy, getMetricGroup, getOperatorID, initializeState, prepareSnapshotPreBarrier, setChainingStrategy, setKeyContextElement1, setKeyContextElement2, snapshotState
notifyCheckpointComplete
getCurrentKey, setCurrentKey
protected void compileGeneratedCode()
compileGeneratedCode
in class WindowOperator<K,W extends Window>
protected void emitWindowResult(W window) throws Exception
WindowOperator
emitWindowResult
in class WindowOperator<K,W extends Window>
Exception
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.