org.apache.cassandra.io.sstable

## Class SSTableMetadata

- java.lang.Object
- - org.apache.cassandra.io.sstable.SSTableMetadata

    public class SSTableMetadata
    extends java.lang.Object

Metadata for a SSTable. Metadata includes: - estimated row size histogram - estimated column count histogram - replay position - max column timestamp - max local deletion time - bloom filter fp chance - compression ratio - partitioner - generations of sstables from which this sstable was compacted, if any - tombstone drop time histogram An SSTableMetadata should be instantiated via the Collector, openFromDescriptor() or createDefaultInstance()

### Nested Class Summary

Nested Classes
`static class` `SSTableMetadata.Collector`
`static class` `SSTableMetadata.SSTableMetadataSerializer`

### Field Summary

Fields
`double` `bloomFilterFPChance`
`double` `compressionRatio`
`EstimatedHistogram` `estimatedColumnCount`
`EstimatedHistogram` `estimatedRowSize`
`StreamingHistogram` `estimatedTombstoneDropTime`
`java.util.List<java.nio.ByteBuffer>` `maxColumnNames`
`int` `maxLocalDeletionTime`
`long` `maxTimestamp`
`java.util.List<java.nio.ByteBuffer>` `minColumnNames`
`long` `minTimestamp`
`static double` `NO_BLOOM_FLITER_FP_CHANCE`
`static double` `NO_COMPRESSION_RATIO`
`java.lang.String` `partitioner`
`ReplayPosition` `replayPosition`
`static SSTableMetadata.SSTableMetadataSerializer` `serializer`
`int` `sstableLevel`

### Method Summary

Methods
`static SSTableMetadata` `copyWithNewSSTableLevel(SSTableMetadata metadata, int sstableLevel)` Deprecated.
`static SSTableMetadata.Collector` `createCollector(AbstractType<?> columnNameComparator)`
`static SSTableMetadata.Collector` `createCollector(java.util.Collection<SSTableReader> sstables, AbstractType<?> columnNameComparator, int level)`
`double` `getDroppableTombstonesBefore(int gcBefore)` Get the amount of droppable tombstones
`double` `getEstimatedDroppableTombstoneRatio(int gcBefore)`

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

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

### Field Detail

#### NO_BLOOM_FLITER_FP_CHANCE

    public static final double NO_BLOOM_FLITER_FP_CHANCE

See Also:
  Constant Field Values

#### NO_COMPRESSION_RATIO

    public static final double NO_COMPRESSION_RATIO

See Also:
  Constant Field Values

#### serializer

    public static final SSTableMetadata.SSTableMetadataSerializer serializer

#### estimatedRowSize

    public final EstimatedHistogram estimatedRowSize

#### estimatedColumnCount

    public final EstimatedHistogram estimatedColumnCount

#### replayPosition

    public final ReplayPosition replayPosition

#### minTimestamp

    public final long minTimestamp

#### maxTimestamp

    public final long maxTimestamp

#### maxLocalDeletionTime

    public final int maxLocalDeletionTime

#### bloomFilterFPChance

    public final double bloomFilterFPChance

#### compressionRatio

    public final double compressionRatio

#### partitioner

    public final java.lang.String partitioner

#### estimatedTombstoneDropTime

    public final StreamingHistogram estimatedTombstoneDropTime

#### sstableLevel

    public final int sstableLevel

#### maxColumnNames

    public final java.util.List<java.nio.ByteBuffer> maxColumnNames

#### minColumnNames

    public final java.util.List<java.nio.ByteBuffer> minColumnNames

### Method Detail

#### createCollector

    public static SSTableMetadata.Collector createCollector(AbstractType<?> columnNameComparator)

#### createCollector

    public static SSTableMetadata.Collector createCollector(java.util.Collection<SSTableReader> sstables,
                                            AbstractType<?> columnNameComparator,
                                            int level)

#### copyWithNewSSTableLevel

    @Deprecated
    public static SSTableMetadata copyWithNewSSTableLevel(SSTableMetadata metadata,
                                                     int sstableLevel)

Deprecated.
Used when updating sstablemetadata files with an sstable level

Parameters:
  `metadata` -
  `sstableLevel` -
Returns:

#### getEstimatedDroppableTombstoneRatio

    public double getEstimatedDroppableTombstoneRatio(int gcBefore)

Parameters:
  `gcBefore` -
Returns:
  estimated droppable tombstone ratio at given gcBefore time.

#### getDroppableTombstonesBefore

    public double getDroppableTombstonesBefore(int gcBefore)

Get the amount of droppable tombstones

Parameters:
  `gcBefore` - the gc time
Returns:
  amount of droppable tombstones