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.
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 |
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()
Copyright © 2010 The Apache Software Foundation