public abstract class BufferBundle<T> extends Object
BufferBundle is a bundle to buffer the input records in memory and fold data based on
specified pattern to reduce state access. The bundle is used in MiniBatchStreamingJoinOperator.
The structure of the bundle varies depending on the JoinInputSideSpec.| 限定符和类型 | 字段和说明 |
|---|---|
protected int |
actualSize |
protected Map<org.apache.flink.table.data.RowData,T> |
bundle |
protected int |
count |
| 构造器和说明 |
|---|
BufferBundle() |
| 限定符和类型 | 方法和说明 |
|---|---|
abstract int |
addRecord(org.apache.flink.table.data.RowData joinKey,
org.apache.flink.table.data.RowData uniqueKey,
org.apache.flink.table.data.RowData record)
Adds a record into the bufferBundle when processing element in a stream and this function
would return the size of the bufferBundle.
|
void |
clear()
Clear this bufferBundle.
|
Set<org.apache.flink.table.data.RowData> |
getJoinKeys()
Get the joinKeys in bufferBundle.
|
abstract Map<org.apache.flink.table.data.RowData,List<org.apache.flink.table.data.RowData>> |
getRecords()
Get records associated with joinKeys from bufferBundle.
|
abstract Map<org.apache.flink.table.data.RowData,List<org.apache.flink.table.data.RowData>> |
getRecordsWithJoinKey(org.apache.flink.table.data.RowData joinKey)
Get records associated with joinKeys from bufferBundle.
|
boolean |
isEmpty()
Check if this bufferBundle is empty.
|
int |
reducedSize()
Return the number of reduced records.
|
public boolean isEmpty()
public int reducedSize()
public void clear()
public Set<org.apache.flink.table.data.RowData> getJoinKeys()
public abstract int addRecord(org.apache.flink.table.data.RowData joinKey,
@Nullable
org.apache.flink.table.data.RowData uniqueKey,
org.apache.flink.table.data.RowData record)
joinKey - the joinKey associated with the record.uniqueKey - the uniqueKey associated with the record. This could be null.record - The record to add.public abstract Map<org.apache.flink.table.data.RowData,List<org.apache.flink.table.data.RowData>> getRecords() throws Exception
Exceptionpublic abstract Map<org.apache.flink.table.data.RowData,List<org.apache.flink.table.data.RowData>> getRecordsWithJoinKey(org.apache.flink.table.data.RowData joinKey) throws Exception
joinKey - one of joinKeys stored in this bundle.ExceptionCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.