public class BufferDataOverWindowOperator extends TableStreamOperator<BaseRow> implements OneInputStreamOperator<BaseRow,BaseRow>, BoundedOneInput
OverWindowFrame
.AbstractStreamOperator.CountingOutput<OUT>
chainingStrategy, config, latencyStats, LOG, metrics, output, timeServiceManager
Constructor and Description |
---|
BufferDataOverWindowOperator(long memorySize,
OverWindowFrame[] overWindowFrames,
GeneratedRecordComparator genComparator,
boolean isRowAllInFixedPart) |
Modifier and Type | Method and Description |
---|---|
void |
close()
This method is called after all records have been added to the operators via the methods
OneInputStreamOperator.processElement(StreamRecord) , or
TwoInputStreamOperator.processElement1(StreamRecord) and
TwoInputStreamOperator.processElement2(StreamRecord) . |
void |
endInput()
It is notified that no more data will arrive on the input.
|
void |
open()
This method is called immediately before any elements are processed, it should contain the
operator's initialization logic, e.g.
|
void |
processElement(StreamRecord<BaseRow> element)
Processes one element that arrived at this operator.
|
dispose
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
dispose, getChainingStrategy, getMetricGroup, getOperatorID, initializeState, prepareSnapshotPreBarrier, setChainingStrategy, setKeyContextElement1, setKeyContextElement2, snapshotState
notifyCheckpointComplete
getCurrentKey, setCurrentKey
public BufferDataOverWindowOperator(long memorySize, OverWindowFrame[] overWindowFrames, GeneratedRecordComparator genComparator, boolean isRowAllInFixedPart)
memorySize
- the memory is assigned to a resettable external buffer.overWindowFrames
- the window frames belong to this operator.genComparator
- the generated sort which is used for generating the comparator amongpublic void open() throws Exception
AbstractStreamOperator
The default implementation does nothing.
open
in interface StreamOperator<BaseRow>
open
in class AbstractStreamOperator<BaseRow>
Exception
- An exception in this method causes the operator to fail.public void processElement(StreamRecord<BaseRow> element) throws Exception
OneInputStreamOperator
processElement
in interface OneInputStreamOperator<BaseRow,BaseRow>
Exception
public void endInput() throws Exception
BoundedOneInput
endInput
in interface BoundedOneInput
Exception
public void close() throws Exception
AbstractStreamOperator
OneInputStreamOperator.processElement(StreamRecord)
, or
TwoInputStreamOperator.processElement1(StreamRecord)
and
TwoInputStreamOperator.processElement2(StreamRecord)
.
The method is expected to flush all remaining buffered data. Exceptions during this flushing of buffered should be propagated, in order to cause the operation to be recognized asa failed, because the last data items are not processed properly.
close
in interface StreamOperator<BaseRow>
close
in class TableStreamOperator<BaseRow>
Exception
- An exception in this method causes the operator to fail.Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.