Class LargestFirstMemoryManager
- java.lang.Object
-
- org.apache.accumulo.server.tabletserver.LargestFirstMemoryManager
-
- All Implemented Interfaces:
MemoryManager
public class LargestFirstMemoryManager extends Object implements MemoryManager
The LargestFirstMemoryManager attempts to keep memory between 80% and 90% full. It adapts over time the point at which it should start a compaction based on how full memory gets between successive calls. It will also flush idle tablets based on a per-table configurable idle time. It will only attempt to flush tablets up to 20% of all memory. And, as the name of the class would suggest, it flushes the tablet with the highest memory footprint. However, it actually chooses the tablet as a function of its size doubled for every 15 minutes of idle time.
-
-
Constructor Summary
Constructors Constructor Description LargestFirstMemoryManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected longcurrentTimeMillis()MemoryManagementActionsgetMemoryManagementActions(List<TabletState> tablets)An implementation of this function will be called periodically by accumulo and should return a list of tablets to minor compact.protected longgetMinCIdleThreshold(KeyExtent extent)voidinit(ServerConfiguration conf)Initialize the memory manager.protected booleantableExists(TableId tableId)voidtabletClosed(KeyExtent extent)This method is called when a tablet is closed.
-
-
-
Method Detail
-
init
public void init(ServerConfiguration conf)
Description copied from interface:MemoryManagerInitialize the memory manager.- Specified by:
initin interfaceMemoryManager
-
getMinCIdleThreshold
protected long getMinCIdleThreshold(KeyExtent extent)
-
tableExists
protected boolean tableExists(TableId tableId)
-
getMemoryManagementActions
public MemoryManagementActions getMemoryManagementActions(List<TabletState> tablets)
Description copied from interface:MemoryManagerAn implementation of this function will be called periodically by accumulo and should return a list of tablets to minor compact. Instructing a tablet that is already minor compacting (this can be inferred from the TabletState) to minor compact has no effect. Holding all ingest does not affect metadata tablets.- Specified by:
getMemoryManagementActionsin interfaceMemoryManager
-
currentTimeMillis
protected long currentTimeMillis()
-
tabletClosed
public void tabletClosed(KeyExtent extent)
Description copied from interface:MemoryManagerThis method is called when a tablet is closed. A memory manger can clean up any per tablet state it is keeping when this is called.- Specified by:
tabletClosedin interfaceMemoryManager
-
-