K - The type of key returned by the KeySelector.W - The type of Window that the WindowAssigner assigns.public class WindowOperator<K,W extends Window> extends org.apache.flink.streaming.api.operators.AbstractStreamOperator<BaseRow> implements org.apache.flink.streaming.api.operators.OneInputStreamOperator<BaseRow,BaseRow>, org.apache.flink.streaming.api.operators.Triggerable<K,W>
WindowAssigner and
Trigger.
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 NamespaceAggsHandleFunction
is invoked to produce the results that are emitted for the pane to which the Trigger
belongs.
The parameter types:
<IN>: BaseRow
<OUT>: JoinedRow(KEY, AGG_RESULT)
<KEY>: GenericRow
<AGG_RESULT>: GenericRow
<ACC>: GenericRow
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
dispose() |
protected org.apache.flink.metrics.Counter |
getNumLateRecordsDropped() |
protected org.apache.flink.metrics.Gauge<Long> |
getWatermarkLatency() |
void |
onEventTime(org.apache.flink.streaming.api.operators.InternalTimer<K,W> timer) |
void |
onProcessingTime(org.apache.flink.streaming.api.operators.InternalTimer<K,W> timer) |
void |
open() |
void |
processElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<BaseRow> record) |
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, snapshotStateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprocessLatencyMarker, processWatermarkgetChainingStrategy, getMetricGroup, getOperatorID, initializeState, prepareSnapshotPreBarrier, setChainingStrategy, setKeyContextElement1, setKeyContextElement2, snapshotStatepublic void open()
throws Exception
public void close()
throws Exception
public void dispose()
throws Exception
public void processElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<BaseRow> record) throws Exception
public void onEventTime(org.apache.flink.streaming.api.operators.InternalTimer<K,W> timer) throws Exception
public void onProcessingTime(org.apache.flink.streaming.api.operators.InternalTimer<K,W> timer) throws Exception
protected org.apache.flink.metrics.Counter getNumLateRecordsDropped()
protected org.apache.flink.metrics.Gauge<Long> getWatermarkLatency()
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.