org.apache.cassandra.io
Class SSTableReader

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

public class SSTableReader
extends SSTable


Field Summary
 
Fields inherited from class org.apache.cassandra.io.SSTable
bf, columnFamilyName, INDEX_INTERVAL, indexPositions, partitioner, path, TEMPFILE_MARKER
 
Method Summary
 void delete()
           
 void forceBloomFilterFailures()
          obviously only for testing
static SSTableReader get(java.lang.String dataFileName)
           
static int getApproximateKeyCount(java.util.List<java.lang.String> dataFiles)
           
 AbstractType getColumnComparator()
           
 FileStruct getFileStruct()
           
static java.util.List<java.lang.String> getIndexedKeys()
          Get all indexed keys in the SSTable.
 java.util.List<org.apache.cassandra.io.SSTable.KeyPosition> getIndexPositions()
           
 long getNearestPosition(java.lang.String 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()
           
 long getPosition(java.lang.String decoratedKey)
          returns the position in the data file to find the given key, or -1 if the key is not present
 java.lang.String getTableName()
           
static int indexInterval()
           
 ColumnFamily makeColumnFamily()
           
static SSTableReader open(java.lang.String dataFileName)
           
static SSTableReader open(java.lang.String dataFileName, IPartitioner partitioner)
           
 
Methods inherited from class org.apache.cassandra.io.SSTable
filterFilename, filterFilename, getColumnFamilyName, getFilename, indexFilename, indexFilename, parseTableName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

indexInterval

public static int indexInterval()

getApproximateKeyCount

public static int getApproximateKeyCount(java.util.List<java.lang.String> dataFiles)

getIndexedKeys

public static java.util.List<java.lang.String> getIndexedKeys()
Get all indexed keys in the SSTable.


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
Throws:
java.io.IOException

get

public static SSTableReader get(java.lang.String dataFileName)

getIndexPositions

public java.util.List<org.apache.cassandra.io.SSTable.KeyPosition> getIndexPositions()

getPosition

public long getPosition(java.lang.String 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(java.lang.String 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

delete

public void delete()
            throws java.io.IOException
Throws:
java.io.IOException

forceBloomFilterFailures

public void forceBloomFilterFailures()
obviously only for testing


getPartitioner

public IPartitioner getPartitioner()

getFileStruct

public FileStruct getFileStruct()
                         throws java.io.IOException
Throws:
java.io.IOException

getTableName

public java.lang.String getTableName()

getColumnComparator

public AbstractType getColumnComparator()

makeColumnFamily

public ColumnFamily makeColumnFamily()


Copyright © 2009 The Apache Software Foundation