public class MemoryManagerImpl extends Object implements MemoryManager
MemoryManager.Callback| Constructor and Description |
|---|
MemoryManagerImpl(Configuration conf)
Create the memory manager.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addedRow(int rows)
Give the memory manager an opportunity for doing a memory check.
|
void |
addWriter(Path path,
long requestedAllocation,
MemoryManager.Callback callback)
Add a new writer's memory allocation to the pool.
|
double |
getAllocationScale()
The scaling factor for each allocation to ensure that the pool isn't
oversubscribed.
|
long |
getTotalMemoryPool()
Get the total pool size that is available for ORC writers.
|
void |
notifyWriters()
Notify all of the writers that they should check their memory usage.
|
void |
removeWriter(Path path)
Remove the given writer from the pool.
|
public MemoryManagerImpl(Configuration conf)
conf - use the configuration to find the maximum size of the memory
pool.public void addWriter(Path path, long requestedAllocation, MemoryManager.Callback callback) throws IOException
addWriter in interface MemoryManagerpath - the file that is being writtenrequestedAllocation - the requested buffer sizeIOExceptionpublic void removeWriter(Path path) throws IOException
removeWriter in interface MemoryManagerpath - the file that has been closedIOExceptionpublic long getTotalMemoryPool()
public double getAllocationScale()
public void addedRow(int rows)
throws IOException
addedRow in interface MemoryManagerrows - number of rows addedIOExceptionpublic void notifyWriters()
throws IOException
IOExceptionCopyright © 2013–2018 The Apache Software Foundation. All rights reserved.