public final class BuddyAllocator extends Object implements EvictionAwareAllocator, BuddyAllocatorMXBean
Constructor and Description |
---|
BuddyAllocator(boolean isDirectVal,
boolean isMappedVal,
int minAllocVal,
int maxAllocVal,
int arenaCount,
long maxSizeVal,
String mapPath,
MemoryManager memoryManager,
LlapDaemonCacheMetrics metrics) |
BuddyAllocator(boolean isDirectVal,
int minAllocVal,
int maxAllocVal,
int arenaCount,
long maxSizeVal,
MemoryManager memoryManager,
LlapDaemonCacheMetrics metrics) |
BuddyAllocator(org.apache.hadoop.conf.Configuration conf,
MemoryManager mm,
LlapDaemonCacheMetrics metrics) |
Modifier and Type | Method and Description |
---|---|
void |
allocateMultiple(org.apache.hadoop.hive.common.io.encoded.MemoryBuffer[] dest,
int size) |
org.apache.hadoop.hive.common.io.encoded.MemoryBuffer |
createUnallocated() |
void |
deallocate(org.apache.hadoop.hive.common.io.encoded.MemoryBuffer buffer) |
void |
deallocateEvicted(org.apache.hadoop.hive.common.io.encoded.MemoryBuffer buffer) |
String |
debugDump() |
int |
getArenaSize()
Gets the arena size.
|
boolean |
getIsDirect()
Gets if bytebuffers are allocated directly offheap.
|
int |
getMaxAllocation()
Gets maximum allocation size of allocator.
|
long |
getMaxCacheSize()
Gets the maximum cache size.
|
int |
getMinAllocation()
Gets minimum allocation size of allocator.
|
boolean |
isDirectAlloc() |
public BuddyAllocator(org.apache.hadoop.conf.Configuration conf, MemoryManager mm, LlapDaemonCacheMetrics metrics)
public BuddyAllocator(boolean isDirectVal, int minAllocVal, int maxAllocVal, int arenaCount, long maxSizeVal, MemoryManager memoryManager, LlapDaemonCacheMetrics metrics)
public BuddyAllocator(boolean isDirectVal, boolean isMappedVal, int minAllocVal, int maxAllocVal, int arenaCount, long maxSizeVal, String mapPath, MemoryManager memoryManager, LlapDaemonCacheMetrics metrics)
public void allocateMultiple(org.apache.hadoop.hive.common.io.encoded.MemoryBuffer[] dest, int size) throws org.apache.hadoop.hive.common.io.Allocator.AllocatorOutOfMemoryException
allocateMultiple
in interface org.apache.hadoop.hive.common.io.Allocator
org.apache.hadoop.hive.common.io.Allocator.AllocatorOutOfMemoryException
public void deallocate(org.apache.hadoop.hive.common.io.encoded.MemoryBuffer buffer)
deallocate
in interface org.apache.hadoop.hive.common.io.Allocator
public void deallocateEvicted(org.apache.hadoop.hive.common.io.encoded.MemoryBuffer buffer)
deallocateEvicted
in interface EvictionAwareAllocator
public boolean isDirectAlloc()
isDirectAlloc
in interface org.apache.hadoop.hive.common.io.Allocator
public String debugDump()
public boolean getIsDirect()
BuddyAllocatorMXBean
getIsDirect
in interface BuddyAllocatorMXBean
public int getMinAllocation()
BuddyAllocatorMXBean
getMinAllocation
in interface BuddyAllocatorMXBean
public int getMaxAllocation()
BuddyAllocatorMXBean
getMaxAllocation
in interface org.apache.hadoop.hive.common.io.Allocator
getMaxAllocation
in interface BuddyAllocatorMXBean
public int getArenaSize()
BuddyAllocatorMXBean
getArenaSize
in interface BuddyAllocatorMXBean
public long getMaxCacheSize()
BuddyAllocatorMXBean
getMaxCacheSize
in interface BuddyAllocatorMXBean
public org.apache.hadoop.hive.common.io.encoded.MemoryBuffer createUnallocated()
createUnallocated
in interface org.apache.hadoop.hive.common.io.Allocator
Copyright © 2021 The Apache Software Foundation. All rights reserved.