public interface MemoryManager
This class is not thread safe, but is re-entrant - ensure creation and all invocations are triggered from the same thread.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
MemoryManager.Callback |
| Modifier and Type | Method and Description |
|---|---|
void |
addedRow(int rows)
Deprecated.
|
void |
addWriter(Path path,
long requestedAllocation,
MemoryManager.Callback callback)
Add a new writer's memory allocation to the pool.
|
default long |
checkMemory(long previousAllocation,
MemoryManager.Callback writer)
As part of adding rows, the writer calls this method to determine
if the scale factor has changed.
|
void |
removeWriter(Path path)
Remove the given writer from the pool.
|
void addWriter(Path path, long requestedAllocation, MemoryManager.Callback callback) throws IOException
path - the file that is being writtenrequestedAllocation - the requested buffer sizeIOExceptionvoid removeWriter(Path path) throws IOException
path - the file that has been closedIOExceptionvoid addedRow(int rows)
throws IOException
checkMemory(long, org.apache.orc.MemoryManager.Callback) insteadrows - number of rows addedIOExceptiondefault long checkMemory(long previousAllocation,
MemoryManager.Callback writer)
throws IOException
previousAllocation - the previous allocationwriter - the callback to call back into if we need toIOExceptionCopyright © 2013–2023 The Apache Software Foundation. All rights reserved.