public final class BuddyAllocator extends Object implements EvictionAwareAllocator, BuddyAllocatorMXBean, LlapOomDebugDump
| Constructor and Description |
|---|
BuddyAllocator(boolean isDirectVal,
boolean isMappedVal,
int minAllocVal,
int maxAllocVal,
int arenaCount,
long maxSizeVal,
long defragHeadroom,
String mapPath,
MemoryManager memoryManager,
LlapDaemonCacheMetrics metrics,
String discardMethod) |
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) |
void |
allocateMultiple(org.apache.hadoop.hive.common.io.encoded.MemoryBuffer[] dest,
int size,
org.apache.hadoop.hive.common.io.Allocator.BufferObjectFactory factory) |
org.apache.hadoop.hive.common.io.encoded.MemoryBuffer |
createUnallocated()
Deprecated.
|
void |
deallocate(org.apache.hadoop.hive.common.io.encoded.MemoryBuffer buffer) |
void |
deallocateEvicted(org.apache.hadoop.hive.common.io.encoded.MemoryBuffer buffer) |
String |
debugDumpForOom() |
void |
debugDumpShort(StringBuilder sb)
Arbitrarily, we start getting the state from Allocator.
|
long |
determineMaxMmSize(long defragHeadroom,
long maxMmSize) |
void |
dumpTestLog() |
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() |
int |
offsetFromHeaderIndex(int lastSplitNextHeader) |
int |
validateAndDetermineArenaSize(int arenaCount,
long maxSizeVal) |
long |
validateAndDetermineMaxSize(long maxSizeVal) |
public BuddyAllocator(org.apache.hadoop.conf.Configuration conf,
MemoryManager mm,
LlapDaemonCacheMetrics metrics)
public BuddyAllocator(boolean isDirectVal,
boolean isMappedVal,
int minAllocVal,
int maxAllocVal,
int arenaCount,
long maxSizeVal,
long defragHeadroom,
String mapPath,
MemoryManager memoryManager,
LlapDaemonCacheMetrics metrics,
String discardMethod)
public long determineMaxMmSize(long defragHeadroom,
long maxMmSize)
public long validateAndDetermineMaxSize(long maxSizeVal)
public int validateAndDetermineArenaSize(int arenaCount,
long maxSizeVal)
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.Allocatororg.apache.hadoop.hive.common.io.Allocator.AllocatorOutOfMemoryExceptionpublic void allocateMultiple(org.apache.hadoop.hive.common.io.encoded.MemoryBuffer[] dest,
int size,
org.apache.hadoop.hive.common.io.Allocator.BufferObjectFactory factory)
throws org.apache.hadoop.hive.common.io.Allocator.AllocatorOutOfMemoryException
allocateMultiple in interface org.apache.hadoop.hive.common.io.Allocatororg.apache.hadoop.hive.common.io.Allocator.AllocatorOutOfMemoryExceptionpublic void debugDumpShort(StringBuilder sb)
debugDumpShort in interface LlapOomDebugDumppublic void deallocate(org.apache.hadoop.hive.common.io.encoded.MemoryBuffer buffer)
deallocate in interface org.apache.hadoop.hive.common.io.Allocatorpublic void deallocateEvicted(org.apache.hadoop.hive.common.io.encoded.MemoryBuffer buffer)
deallocateEvicted in interface EvictionAwareAllocatorpublic boolean isDirectAlloc()
isDirectAlloc in interface org.apache.hadoop.hive.common.io.Allocator@Deprecated public org.apache.hadoop.hive.common.io.encoded.MemoryBuffer createUnallocated()
createUnallocated in interface org.apache.hadoop.hive.common.io.Allocatorpublic boolean getIsDirect()
BuddyAllocatorMXBeangetIsDirect in interface BuddyAllocatorMXBeanpublic int getMinAllocation()
BuddyAllocatorMXBeangetMinAllocation in interface BuddyAllocatorMXBeanpublic int getMaxAllocation()
BuddyAllocatorMXBeangetMaxAllocation in interface org.apache.hadoop.hive.common.io.AllocatorgetMaxAllocation in interface BuddyAllocatorMXBeanpublic int getArenaSize()
BuddyAllocatorMXBeangetArenaSize in interface BuddyAllocatorMXBeanpublic long getMaxCacheSize()
BuddyAllocatorMXBeangetMaxCacheSize in interface BuddyAllocatorMXBeanpublic int offsetFromHeaderIndex(int lastSplitNextHeader)
public String debugDumpForOom()
debugDumpForOom in interface LlapOomDebugDumppublic void dumpTestLog()
Copyright © 2019 The Apache Software Foundation. All Rights Reserved.