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 GroupWindowAssigner
. 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, RowData, Collector)
is invoked to
produce the results that are emitted for the pane to which the Trigger
belongs.
collector, previousState, produceUpdates, recordCounter, shiftTimeZone, windowAggregator, windowFunction
chainingStrategy, config, lastRecordAttributes1, lastRecordAttributes2, latencyStats, LOG, metrics, output, processingTimeService, stateHandler, stateKeySelector1, stateKeySelector2, timeServiceManager
Modifier and Type | Method and Description |
---|---|
protected void |
compileGeneratedCode() |
protected void |
emitWindowResult(W window)
Emits the window result of the given window.
|
close, getNumLateRecordsDropped, getWatermarkLatency, onEventTime, onProcessingTime, open, processElement
finish, getChainingStrategy, getContainingTask, getCurrentKey, getExecutionConfig, getInternalTimerService, getKeyedStateBackend, getKeyedStateStore, getMetricGroup, getOperatorConfig, getOperatorID, getOperatorName, getOperatorStateBackend, getOrCreateKeyedState, getPartitionedState, getPartitionedState, getProcessingTimeService, getRuntimeContext, getStateKeySelector1, getStateKeySelector2, getTimeServiceManager, getUserCodeClassloader, hasKeyContext1, hasKeyContext2, initializeState, initializeState, isUsingCustomRawKeyedState, notifyCheckpointAborted, notifyCheckpointComplete, prepareSnapshotPreBarrier, processLatencyMarker, processLatencyMarker1, processLatencyMarker2, processRecordAttributes, processRecordAttributes1, processRecordAttributes2, processWatermark, processWatermark1, processWatermark2, processWatermarkStatus, processWatermarkStatus1, processWatermarkStatus2, reportOrForwardLatencyMarker, setChainingStrategy, setCurrentKey, setKeyContextElement1, setKeyContextElement2, setMailboxExecutor, setProcessingTimeService, setup, snapshotState, snapshotState, useSplittableTimers
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setKeyContextElement
finish, getMetricGroup, getOperatorAttributes, getOperatorID, initializeState, prepareSnapshotPreBarrier, setKeyContextElement1, setKeyContextElement2, snapshotState
notifyCheckpointAborted, notifyCheckpointComplete
getCurrentKey, setCurrentKey
processLatencyMarker, processRecordAttributes, processWatermark, processWatermarkStatus
hasKeyContext
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–2024 The Apache Software Foundation. All rights reserved.