org.apache.cassandra.io
Class SSTable

java.lang.Object
  extended by org.apache.cassandra.io.SSTable
Direct Known Subclasses:
SSTableReader, SSTableWriter

public abstract class SSTable
extends java.lang.Object

This class is built on top of the SequenceFile. It stores data on disk in sorted fashion. However the sorting is upto the application. This class expects keys to be handed to it in sorted order. A separate index file is maintained as well, containing the SSTable keys and the offset into the SSTable at which they are found. Every 1/indexInterval key is read into memory when the SSTable is opened. Finally, a bloom filter file is also kept for the keys in each SSTable.


Field Summary
protected  BloomFilter bf
           
protected  java.lang.String columnFamilyName
           
static int INDEX_INTERVAL
           
protected  java.util.List<org.apache.cassandra.io.SSTable.KeyPosition> indexPositions
           
protected  IPartitioner partitioner
           
protected  java.lang.String path
           
static java.lang.String TEMPFILE_MARKER
           
 
Constructor Summary
SSTable(java.lang.String filename, IPartitioner partitioner)
           
 
Method Summary
 java.lang.String filterFilename()
           
protected static java.lang.String filterFilename(java.lang.String dataFile)
           
 java.lang.String getColumnFamilyName()
           
 java.lang.String getFilename()
           
 java.lang.String indexFilename()
           
protected static java.lang.String indexFilename(java.lang.String dataFile)
           
static java.lang.String parseTableName(java.lang.String filename)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

path

protected java.lang.String path

partitioner

protected IPartitioner partitioner

bf

protected BloomFilter bf

indexPositions

protected java.util.List<org.apache.cassandra.io.SSTable.KeyPosition> indexPositions

columnFamilyName

protected java.lang.String columnFamilyName

INDEX_INTERVAL

public static final int INDEX_INTERVAL
See Also:
Constant Field Values

TEMPFILE_MARKER

public static final java.lang.String TEMPFILE_MARKER
See Also:
Constant Field Values
Constructor Detail

SSTable

public SSTable(java.lang.String filename,
               IPartitioner partitioner)
Method Detail

indexFilename

protected static java.lang.String indexFilename(java.lang.String dataFile)

indexFilename

public java.lang.String indexFilename()

filterFilename

protected static java.lang.String filterFilename(java.lang.String dataFile)

filterFilename

public java.lang.String filterFilename()

getFilename

public java.lang.String getFilename()

getColumnFamilyName

public java.lang.String getColumnFamilyName()

parseTableName

public static java.lang.String parseTableName(java.lang.String filename)


Copyright © 2009 The Apache Software Foundation