@Internal public final class SlicingWindowOperator<K,W> extends WindowOperatorBase<K,W>
SlicingWindowOperator
implements an optimized processing for aligned windows which
can apply the slicing optimization. The core idea of slicing optimization is to divide all
elements from a data stream into a finite number of non-overlapping chunks (a.k.a. slices).
Dividing a window of aligned windows into a finite number of non-overlapping chunks, where the chunks are slices. It has the following properties:
A slicing window operator is a simple wrap of SlicingWindowProcessor
. It delegates all
the important methods to the underlying processor, where the processor can have different
implementation for aggregate and topk or others.
A SlicingWindowProcessor
usually leverages the SliceAssigner
to assign slices
and calculate based on the slices. See SliceSharedWindowAggProcessor
as an example.
Note: since SlicingWindowProcessor
leverages slicing optimization for aligned windows,
therefore, it doesn't support unaligned windows, e.g. session window.
See more details in WindowOperatorBase
.
TableStreamOperator.ContextImpl
collector, internalTimerService, lastTriggeredProcessingTime, lateRecordsDroppedRate, numLateRecordsDropped, watermarkLatency, watermarkState, windowProcessor
ctx, currentWatermark
chainingStrategy, config, lastRecordAttributes1, lastRecordAttributes2, latencyStats, LOG, metrics, output, processingTimeService
Constructor and Description |
---|
SlicingWindowOperator(SlicingWindowProcessor<W> windowProcessor) |
close, getNumLateRecordsDropped, getWatermarkLatency, initializeState, onEventTime, onProcessingTime, open, prepareSnapshotPreBarrier, processElement, processWatermark, snapshotState
computeMemorySize
finish, getChainingStrategy, getContainingTask, getCurrentKey, getExecutionConfig, getInternalTimerService, getKeyedStateBackend, getKeyedStateStore, getMetricGroup, getOperatorConfig, getOperatorID, getOperatorName, getOperatorStateBackend, getOrCreateKeyedState, getPartitionedState, getPartitionedState, getProcessingTimeService, getRuntimeContext, getTimeServiceManager, getUserCodeClassloader, hasKeyContext1, hasKeyContext2, initializeState, isUsingCustomRawKeyedState, notifyCheckpointAborted, notifyCheckpointComplete, processLatencyMarker, processLatencyMarker1, processLatencyMarker2, processRecordAttributes, processRecordAttributes1, processRecordAttributes2, processWatermark1, processWatermark2, processWatermarkStatus, processWatermarkStatus1, processWatermarkStatus2, reportOrForwardLatencyMarker, setChainingStrategy, setCurrentKey, setKeyContextElement1, setKeyContextElement2, setProcessingTimeService, setup, snapshotState
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setKeyContextElement
finish, getMetricGroup, getOperatorID, initializeState, setKeyContextElement1, setKeyContextElement2, snapshotState
notifyCheckpointAborted, notifyCheckpointComplete
getCurrentKey, setCurrentKey
processLatencyMarker, processRecordAttributes, processWatermarkStatus
hasKeyContext
public SlicingWindowOperator(SlicingWindowProcessor<W> windowProcessor)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.