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.Allocator
org.apache.hadoop.hive.common.io.Allocator.AllocatorOutOfMemoryException
public 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.Allocator
org.apache.hadoop.hive.common.io.Allocator.AllocatorOutOfMemoryException
public void debugDumpShort(StringBuilder sb)
debugDumpShort
in interface LlapOomDebugDump
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
@Deprecated public org.apache.hadoop.hive.common.io.encoded.MemoryBuffer createUnallocated()
createUnallocated
in interface org.apache.hadoop.hive.common.io.Allocator
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 int offsetFromHeaderIndex(int lastSplitNextHeader)
public String debugDumpForOom()
debugDumpForOom
in interface LlapOomDebugDump
public void dumpTestLog()
Copyright © 2022 The Apache Software Foundation. All rights reserved.