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| Constructor and Description |
|---|
ResettableExternalBuffer(org.apache.flink.runtime.memory.MemoryManager memoryManager,
org.apache.flink.runtime.io.disk.iomanager.IOManager ioManager,
List<org.apache.flink.core.memory.MemorySegment> memory,
AbstractRowSerializer serializer,
boolean isRowAllInFixedPart) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(BaseRow 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 ResettableExternalBuffer(org.apache.flink.runtime.memory.MemoryManager memoryManager,
org.apache.flink.runtime.io.disk.iomanager.IOManager ioManager,
List<org.apache.flink.core.memory.MemorySegment> memory,
AbstractRowSerializer serializer,
boolean isRowAllInFixedPart)
public void reset()
ResettableRowBufferreset in interface ResettableRowBufferpublic void add(BaseRow 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–2020 The Apache Software Foundation. All rights reserved.