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.
| 限定符和类型 | 类和说明 |
|---|---|
class |
ResettableExternalBuffer.BufferIterator
Iterator of external buffer.
|
ResettableRowBuffer.ResettableIterator| 限定符和类型 | 字段和说明 |
|---|---|
static int |
MIN_NUM_MEMORY
The minimum number of segments that are required, 320 KibiBytes.
|
| 构造器和说明 |
|---|
ResettableExternalBuffer(org.apache.flink.runtime.io.disk.iomanager.IOManager ioManager,
LazyMemorySegmentPool pool,
AbstractRowDataSerializer serializer,
boolean isRowAllInFixedPart) |
| 限定符和类型 | 方法和说明 |
|---|---|
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 在接口中 ResettableRowBufferpublic void add(org.apache.flink.table.data.RowData row)
throws IOException
ResettableRowBufferadd 在接口中 ResettableRowBufferIOExceptionpublic void complete()
ResettableRowBuffercomplete 在接口中 ResettableRowBufferpublic ResettableExternalBuffer.BufferIterator newIterator()
ResettableRowBuffernewIterator 在接口中 ResettableRowBufferpublic ResettableExternalBuffer.BufferIterator newIterator(int beginRow)
ResettableRowBuffernewIterator 在接口中 ResettableRowBufferpublic void close()
close 在接口中 Closeableclose 在接口中 AutoCloseablepublic int size()
public long getUsedMemoryInBytes()
public int getNumSpillFiles()
public long getSpillInBytes()
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.