public class ResettableExternalBuffer extends Object implements ResettableRowBuffer
NOTE: Not supports reading while writing. In the face of concurrent modification, the iterator fails quickly and cleanly, rather than risking arbitrary, non-deterministic behavior at an undetermined time in the future.
| Modifier and Type | Class and Description |
|---|---|
class |
ResettableExternalBuffer.BufferIterator
Iterator of external buffer.
|
ResettableRowBuffer.ResettableIterator| Modifier and Type | Field and Description |
|---|---|
static int |
MIN_NUM_MEMORY
The minimum number of segments that are required, 320 KibiBytes.
|
| Constructor and Description |
|---|
ResettableExternalBuffer(org.apache.flink.runtime.io.disk.iomanager.IOManager ioManager,
LazyMemorySegmentPool pool,
AbstractRowDataSerializer serializer,
boolean isRowAllInFixedPart) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(org.apache.flink.table.data.RowData row)
Appends the specified row to the end of this buffer.
|
void |
close()
Delete all files and release the memory.
|
void |
complete()
Finally, complete add.
|
int |
getNumSpillFiles() |
long |
getSpillInBytes() |
long |
getUsedMemoryInBytes() |
ResettableExternalBuffer.BufferIterator |
newIterator()
Get a new iterator starting from first row.
|
ResettableExternalBuffer.BufferIterator |
newIterator(int beginRow)
Get a new iterator starting from the `beginRow`-th row.
|
void |
reset()
Re-initialize the buffer state.
|
int |
size() |
public static final int MIN_NUM_MEMORY
public ResettableExternalBuffer(org.apache.flink.runtime.io.disk.iomanager.IOManager ioManager,
LazyMemorySegmentPool pool,
AbstractRowDataSerializer serializer,
boolean isRowAllInFixedPart)
public void reset()
ResettableRowBufferreset in interface ResettableRowBufferpublic void add(org.apache.flink.table.data.RowData row)
throws IOException
ResettableRowBufferadd in interface ResettableRowBufferIOExceptionpublic void complete()
ResettableRowBuffercomplete in interface ResettableRowBufferpublic ResettableExternalBuffer.BufferIterator newIterator()
ResettableRowBuffernewIterator in interface ResettableRowBufferpublic ResettableExternalBuffer.BufferIterator newIterator(int beginRow)
ResettableRowBuffernewIterator in interface ResettableRowBufferpublic void close()
close in interface Closeableclose in interface AutoCloseablepublic int size()
public long getUsedMemoryInBytes()
public int getNumSpillFiles()
public long getSpillInBytes()
Copyright © 2014–2025 The Apache Software Foundation. All rights reserved.