IndexSummaryManager (apache-cassandra API)
Date: 2018-02-12

org.apache.cassandra.io.sstable

## Class IndexSummaryManager

- java.lang.Object
- - org.apache.cassandra.io.sstable.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.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static IndexSummaryManager` | `instance`
    `static java.lang.String` | `MBEAN_NAME`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `getAverageIndexInterval()`
    `java.util.Map<java.lang.String,java.lang.Integer>` | `getIndexIntervals()` Returns a map of SSTable filenames to their current effective index interval.
    `long` | `getMemoryPoolCapacityInMB()`
    `double` | `getMemoryPoolSizeInMB()` Returns the actual space consumed by index summaries for all sstables.
    `int` | `getResizeIntervalInMinutes()`
    `void` | `redistributeSummaries()`
    `static java.util.List<SSTableReader>` | `redistributeSummaries(IndexSummaryRedistribution redistribution)` Attempts to fairly distribute a fixed pool of memory for index summaries across a set of SSTables based on their recent read rates.
    `void` | `setMemoryPoolCapacityInMB(long memoryPoolCapacityInMB)`
    `void` | `setResizeIntervalInMinutes(int resizeIntervalInMinutes)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### MBEAN_NAME

          public static final java.lang.String MBEAN_NAME

      See Also:
        Constant Field Values

    - #### instance

          public static final IndexSummaryManager instance

  - ### Method Detail

    - #### getResizeIntervalInMinutes

          public int getResizeIntervalInMinutes()

      Specified by:
        `getResizeIntervalInMinutes` in interface `IndexSummaryManagerMBean`

    - #### setResizeIntervalInMinutes

          public void setResizeIntervalInMinutes(int resizeIntervalInMinutes)

      Specified by:
        `setResizeIntervalInMinutes` in interface `IndexSummaryManagerMBean`

    - #### getMemoryPoolCapacityInMB

          public long getMemoryPoolCapacityInMB()

      Specified by:
        `getMemoryPoolCapacityInMB` in interface `IndexSummaryManagerMBean`

    - #### getIndexIntervals

          public java.util.Map<java.lang.String,java.lang.Integer> getIndexIntervals()

      Description copied from interface: `IndexSummaryManagerMBean`
      Returns a map of SSTable filenames to their current effective index interval.
      Specified by:
        `getIndexIntervals` in interface `IndexSummaryManagerMBean`

    - #### getAverageIndexInterval

          public double getAverageIndexInterval()

      Specified by:
        `getAverageIndexInterval` in interface `IndexSummaryManagerMBean`

    - #### setMemoryPoolCapacityInMB

          public void setMemoryPoolCapacityInMB(long memoryPoolCapacityInMB)

      Specified by:
        `setMemoryPoolCapacityInMB` in interface `IndexSummaryManagerMBean`

    - #### 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 void redistributeSummaries()
                                     throws java.io.IOException

      Specified by:
        `redistributeSummaries` in interface `IndexSummaryManagerMBean`
      Throws:
        `java.io.IOException`

    - #### 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`

Copyright © 2018 The Apache Software Foundation