org.apache.cassandra.db.compaction

## Class LeveledManifest

- java.lang.Object
- - org.apache.cassandra.db.compaction.LeveledManifest

    public class LeveledManifest
    extends java.lang.Object

### Nested Class Summary

Nested Classes
`static class` `LeveledManifest.CompactionCandidate`

### Field Summary

Fields
`static java.lang.String` `EXTENSION`

### Method Summary

Methods
`void` `add(SSTableReader reader)`
`static LeveledManifest` `create(ColumnFamilyStore cfs, int maxSSTableSize, java.lang.Iterable<SSTableReader> sstables, SizeTieredCompactionStrategyOptions options)`
`static LeveledManifest` `create(ColumnFamilyStore cfs, int maxSSTableSize, java.util.List<SSTableReader> sstables)`
`int[]` `getAllLevelSize()`
`LeveledManifest.CompactionCandidate` `getCompactionCandidates()`
`int` `getEstimatedTasks()`
`java.util.List<SSTableReader>` `getLevel(int i)`
`int` `getLevelCount()`
`int` `getLevelSize(int i)`
`java.util.SortedSet<SSTableReader>` `getLevelSorted(int level, java.util.Comparator<SSTableReader> comparator)`
`int` `getNextLevel(java.util.Collection<SSTableReader> sstables)`
`static void` `maybeMigrateManifests()`
`static void` `mutateLevel(Pair<SSTableMetadata,java.util.Set<java.lang.Integer>> oldMetadata, Descriptor descriptor, java.lang.String filename, int level)` Scary method mutating existing sstable component Tries to do it safely by moving the new file on top of the old one Caller needs to reload the sstable metadata (sstableReader.reloadSSTableMetadata())
`int` `remove(SSTableReader reader)`
`void` `repairOverlappingSSTables(int level)`
`void` `replace(java.util.Collection<SSTableReader> removed, java.util.Collection<SSTableReader> added)`
`java.lang.String` `toString()`

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

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

### Field Detail

#### EXTENSION

    public static final java.lang.String EXTENSION

See Also:
  Constant Field Values

### Method Detail

#### create

    public static LeveledManifest create(ColumnFamilyStore cfs,
                         int maxSSTableSize,
                         java.util.List<SSTableReader> sstables)

#### create

    public static LeveledManifest create(ColumnFamilyStore cfs,
                         int maxSSTableSize,
                         java.lang.Iterable<SSTableReader> sstables,
                         SizeTieredCompactionStrategyOptions options)

#### add

    public void add(SSTableReader reader)

#### replace

    public void replace(java.util.Collection<SSTableReader> removed,
               java.util.Collection<SSTableReader> added)

#### repairOverlappingSSTables

    public void repairOverlappingSSTables(int level)

#### getCompactionCandidates

    public LeveledManifest.CompactionCandidate getCompactionCandidates()

Returns:
  highest-priority sstables to compact, and level to compact them to If no compactions are necessary, will return null

#### getLevelSize

    public int getLevelSize(int i)

#### getAllLevelSize

    public int[] getAllLevelSize()

#### remove

    public int remove(SSTableReader reader)

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`

#### getLevelCount

    public int getLevelCount()

#### getLevelSorted

    public java.util.SortedSet<SSTableReader> getLevelSorted(int level,
                                                    java.util.Comparator<SSTableReader> comparator)

#### getLevel

    public java.util.List<SSTableReader> getLevel(int i)

#### getEstimatedTasks

    public int getEstimatedTasks()

#### getNextLevel

    public int getNextLevel(java.util.Collection<SSTableReader> sstables)

#### mutateLevel

    public static void mutateLevel(Pair<SSTableMetadata,java.util.Set<java.lang.Integer>> oldMetadata,
                   Descriptor descriptor,
                   java.lang.String filename,
                   int level)
                            throws java.io.IOException

Scary method mutating existing sstable component Tries to do it safely by moving the new file on top of the old one Caller needs to reload the sstable metadata (sstableReader.reloadSSTableMetadata())

Parameters:
  `oldMetadata` -
  `descriptor` -
  `filename` -
  `level` -
Throws:
  `java.io.IOException`
See Also:
  `SSTableReader.reloadSSTableMetadata()`

#### maybeMigrateManifests

    public static void maybeMigrateManifests()
                                      throws java.io.IOException

Throws:
  `java.io.IOException`