Class 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 Detail

      • LargestFirstMemoryManager

        public LargestFirstMemoryManager()
    • Method Detail

      • getMinCIdleThreshold

        protected long getMinCIdleThreshold​(KeyExtent extent)
      • tableExists

        protected boolean tableExists​(TableId tableId)
      • getMemoryManagementActions

        public MemoryManagementActions getMemoryManagementActions​(List<TabletState> tablets)
        Description copied from interface: MemoryManager
        An 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:
        getMemoryManagementActions in interface MemoryManager
      • currentTimeMillis

        protected long currentTimeMillis()
      • tabletClosed

        public void tabletClosed​(KeyExtent extent)
        Description copied from interface: MemoryManager
        This 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:
        tabletClosed in interface MemoryManager