Class IndexSummaryManager

  • All Implemented Interfaces:
    IndexSummaryManagerMBean

    public class IndexSummaryManager
    extends java.lang.Object
    implements IndexSummaryManagerMBean
    Manages the fixed-size memory pool for index summaries, periodically resizing them in order to give more memory to hot sstables and less memory to cold sstables.
    • Method Detail

      • getMemoryPoolSizeInMB

        public double getMemoryPoolSizeInMB()
        Returns the actual space consumed by index summaries for all sstables.
        Specified by:
        getMemoryPoolSizeInMB in interface IndexSummaryManagerMBean
        Returns:
        space currently used in MB
      • redistributeSummaries

        public static java.util.List<SSTableReader> redistributeSummaries​(IndexSummaryRedistribution redistribution)
                                                                   throws java.io.IOException
        Attempts to fairly distribute a fixed pool of memory for index summaries across a set of SSTables based on their recent read rates.
        Parameters:
        redistribution - encapsulating the transactions containing the sstables we are to redistribute the memory pool across and a size (in bytes) that the total index summary space usage should stay close to or under, if possible
        Returns:
        a list of new SSTableReader instances
        Throws:
        java.io.IOException
      • shutdownAndWait

        public void shutdownAndWait​(long timeout,
                                    java.util.concurrent.TimeUnit unit)
                             throws java.lang.InterruptedException,
                                    java.util.concurrent.TimeoutException
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.TimeoutException