public final class RecordsWindowBuffer extends Object implements WindowBuffer
WindowBuffer that buffers input elements in a WindowBytesMultiMap and combines buffered elements into state when flushing.| 限定符和类型 | 类和说明 |
|---|---|
static class |
RecordsWindowBuffer.Factory
Factory to create
RecordsWindowBuffer with RecordsCombiner.Factory. |
static class |
RecordsWindowBuffer.LocalFactory
Factory to create
RecordsWindowBuffer with RecordsCombiner.LocalFactory. |
| 构造器和说明 |
|---|
RecordsWindowBuffer(Object operatorOwner,
org.apache.flink.runtime.memory.MemoryManager memoryManager,
long memorySize,
RecordsCombiner combineFunction,
PagedTypeSerializer<org.apache.flink.table.data.RowData> keySer,
AbstractRowDataSerializer<org.apache.flink.table.data.RowData> inputSer,
boolean requiresCopy,
java.time.ZoneId shiftTimeZone) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addElement(org.apache.flink.table.data.RowData key,
long sliceEnd,
org.apache.flink.table.data.RowData element)
Adds an element with associated key into the buffer.
|
void |
advanceProgress(long progress)
Advances the progress time, the progress time is watermark if working in event-time mode, or
current processing time if working in processing-time mode.
|
void |
close()
Release resources allocated by this buffer.
|
void |
flush()
Flushes all intermediate buffered data to the underlying backend or output stream.
|
public RecordsWindowBuffer(Object operatorOwner, org.apache.flink.runtime.memory.MemoryManager memoryManager, long memorySize, RecordsCombiner combineFunction, PagedTypeSerializer<org.apache.flink.table.data.RowData> keySer, AbstractRowDataSerializer<org.apache.flink.table.data.RowData> inputSer, boolean requiresCopy, java.time.ZoneId shiftTimeZone)
public void addElement(org.apache.flink.table.data.RowData key,
long sliceEnd,
org.apache.flink.table.data.RowData element)
throws Exception
WindowBufferIt may be that adding this element fills up an internal buffer and causes the buffer flushing of a batch of internally buffered elements.
addElement 在接口中 WindowBufferkey - the key associated with the elementelement - The element to add.Exception - Thrown, if the element cannot be added to the buffer, or if the flushing
throws an exception.public void advanceProgress(long progress)
throws Exception
WindowBufferThis will potentially flush buffered data into states or to the output stream, because the watermark advancement may be in a very small step, but we don't need to flush buffered data for every watermark advancement.
advanceProgress 在接口中 WindowBufferprogress - the current progress timeExceptionpublic void flush()
throws Exception
WindowBufferflush 在接口中 WindowBufferException - Thrown if the buffer cannot be flushed, or if the output stream throws an
exception.public void close()
throws Exception
WindowBufferclose 在接口中 WindowBufferExceptionCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.