## org.apache.cassandra.io
Class SSTableReader

    java.lang.Object
      org.apache.cassandra.io.SSTable
          org.apache.cassandra.io.SSTableReader

All Implemented Interfaces:
  java.lang.Comparable<SSTableReader>

    public class SSTableReader

extends SSTable
implements java.lang.Comparable<SSTableReader>

SSTableReaders are open()ed by Table.onStart; after that they are created by SSTableWriter.renameAndOpen. Do not re-call open() on existing SSTable files; use the references kept by ColumnFamilyStore post-start instead.

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.cassandra.io.SSTable
`SSTable.PositionSize`

Field Summary

Fields inherited from class org.apache.cassandra.io.SSTable
`bf, columnFamilyName, FILES_ON_DISK, indexSummary, partitioner, path, TEMPFILE_MARKER`

Method Summary
`int` `compareTo(SSTableReader o)`
`long` `estimatedKeys()`
`void` `forceBloomFilterFailures()` obviously only for testing
`static long` `getApproximateKeyCount(java.lang.Iterable<SSTableReader> sstables)`
`long` `getBloomFilterFalsePositiveCount()`
`long` `getBloomFilterTruePositiveCount()`
`AbstractType` `getColumnComparator()`
`ICompactSerializer2<IColumn>` `getColumnSerializer()`
`FileDataInput` `getFileDataInput(DecoratedKey decoratedKey, int bufferSize)`
`java.util.List<IndexSummary.KeyPosition>` `getIndexPositions()`
`long` `getNearestPosition(DecoratedKey decoratedKey)` like getPosition, but if key is not found will return the location of the first key _greater_ than the desired one, or -1 if no such key exists.
`IPartitioner` `getPartitioner()`
`SSTable.PositionSize` `getPosition(DecoratedKey decoratedKey)` returns the position in the data file to find the given key, or -1 if the key is not present
`long` `getRecentBloomFilterFalsePositiveCount()`
`long` `getRecentBloomFilterTruePositiveCount()`
`SSTableScanner` `getScanner(int bufferSize)`
`static int` `indexInterval()`
`long` `length()`
`ColumnFamily` `makeColumnFamily()`
`void` `markCompacted()`
`static SSTableReader` `open(java.lang.String dataFileName)`
`static SSTableReader` `open(java.lang.String dataFileName, IPartitioner partitioner)` public, but only for tests
`void` `setTrackedBy(SSTableTracker tracker)`

Methods inherited from class org.apache.cassandra.io.SSTable
`bytesOnDisk, compactedFilename, compactedFilename, deleteIfCompacted, filterFilename, filterFilename, getAllFilenames, getColumnFamilyName, getFilename, getTableName, getTotalBytes, indexFilename, indexFilename, parseColumnFamilyName, parseTableName, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Method Detail

### indexInterval

    public static int indexInterval()

### getApproximateKeyCount

    public static long getApproximateKeyCount(java.lang.Iterable<SSTableReader> sstables)

### open

    public static SSTableReader open(java.lang.String dataFileName)
                              throws java.io.IOException

  Throws:
    `java.io.IOException`

### open

    public static SSTableReader open(java.lang.String dataFileName,
                                     IPartitioner partitioner)
                              throws java.io.IOException

  public, but only for tests

  Throws:
    `java.io.IOException`

### setTrackedBy

    public void setTrackedBy(SSTableTracker tracker)

### getIndexPositions

    public java.util.List<IndexSummary.KeyPosition> getIndexPositions()

### estimatedKeys

    public long estimatedKeys()

### getPosition

    public SSTable.PositionSize getPosition(DecoratedKey decoratedKey)
                                     throws java.io.IOException

  returns the position in the data file to find the given key, or -1 if the key is not present

  Throws:
    `java.io.IOException`

### getNearestPosition

    public long getNearestPosition(DecoratedKey decoratedKey)
                            throws java.io.IOException

  like getPosition, but if key is not found will return the location of the first key _greater_ than the desired one, or -1 if no such key exists.

  Throws:
    `java.io.IOException`

### length

    public long length()

### compareTo

    public int compareTo(SSTableReader o)

  Specified by:
    `compareTo` in interface `java.lang.Comparable<SSTableReader>`

### markCompacted

    public void markCompacted()
                       throws java.io.IOException

  Throws:
    `java.io.IOException`

### forceBloomFilterFailures

    public void forceBloomFilterFailures()

  obviously only for testing

### getPartitioner

    public IPartitioner getPartitioner()

### getScanner

    public SSTableScanner getScanner(int bufferSize)
                              throws java.io.IOException

  Throws:
    `java.io.IOException`

### getFileDataInput

    public FileDataInput getFileDataInput(DecoratedKey decoratedKey,
                                          int bufferSize)
                                   throws java.io.IOException

  Throws:
    `java.io.IOException`

### getColumnComparator

    public AbstractType getColumnComparator()

### makeColumnFamily

    public ColumnFamily makeColumnFamily()

### getColumnSerializer

    public ICompactSerializer2<IColumn> getColumnSerializer()

### getBloomFilterFalsePositiveCount

    public long getBloomFilterFalsePositiveCount()

### getRecentBloomFilterFalsePositiveCount

    public long getRecentBloomFilterFalsePositiveCount()

### getBloomFilterTruePositiveCount

    public long getBloomFilterTruePositiveCount()

### getRecentBloomFilterTruePositiveCount

    public long getRecentBloomFilterTruePositiveCount()

Copyright © 2010 The Apache Software Foundation