org.apache.cassandra.db
Class Table

java.lang.Object
  extended by org.apache.cassandra.db.Table

public class Table
extends java.lang.Object

Author : Avinash Lakshman ( alakshman@facebook.com) & Prashant Malik ( pmalik@facebook.com )


Nested Class Summary
static class Table.BootstrapCompletionHandler
          This is the callback handler that is invoked when we have completely been bootstrapped for a single file by a remote host.
static class Table.BootStrapInitiateVerbHandler
           
static class Table.TableMetadata
           
 
Field Summary
static java.lang.String SYSTEM_TABLE
           
 
Method Summary
 void clearSnapshot()
          Clear all the snapshots for a given table.
 void flush(boolean fRecovery)
           
 void forceCleanup()
          Do a cleanup of keys that do not belong locally.
 void forceCompaction()
           
 boolean forceCompaction(java.util.List<Range> ranges, EndPoint target, java.util.List<java.lang.String> fileList)
           
 Row get(java.lang.String key)
          Deprecated. 
 ColumnFamily get(java.lang.String key, java.lang.String cfName)
          Deprecated. 
 java.util.List<SSTableReader> getAllSSTablesOnDisk()
           
 java.util.SortedSet<java.lang.String> getApplicationColumnFamilies()
           
 java.util.Set<java.lang.String> getColumnFamilies()
           
 ColumnFamilyStore getColumnFamilyStore(java.lang.String cfName)
           
 Row getRow(QueryFilter filter)
           
 Row getRow(java.lang.String key, java.lang.String cfName)
          Deprecated. 
static java.lang.String getSnapshotPath(java.lang.String dataDirPath, java.lang.String tableName, java.lang.String snapshotName)
           
 void onStart()
           
static Table open(java.lang.String table)
           
 void snapshot(java.lang.String clientSuppliedName)
          Take a snapshot of the entire set of column families with a given timestamp.
 java.lang.String tableStats(java.lang.String newLineSeparator, java.text.DecimalFormat df)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SYSTEM_TABLE

public static final java.lang.String SYSTEM_TABLE
See Also:
Constant Field Values
Method Detail

open

public static Table open(java.lang.String table)
                  throws java.io.IOException
Throws:
java.io.IOException

getColumnFamilies

public java.util.Set<java.lang.String> getColumnFamilies()

getColumnFamilyStore

public ColumnFamilyStore getColumnFamilyStore(java.lang.String cfName)

tableStats

public java.lang.String tableStats(java.lang.String newLineSeparator,
                                   java.text.DecimalFormat df)

onStart

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

forceCleanup

public void forceCleanup()
Do a cleanup of keys that do not belong locally.


snapshot

public void snapshot(java.lang.String clientSuppliedName)
              throws java.io.IOException
Take a snapshot of the entire set of column families with a given timestamp.

Parameters:
clientSuppliedName - the tag associated with the name of the snapshot. This value can be null.
Throws:
java.io.IOException

clearSnapshot

public void clearSnapshot()
                   throws java.io.IOException
Clear all the snapshots for a given table.

Throws:
java.io.IOException

forceCompaction

public boolean forceCompaction(java.util.List<Range> ranges,
                               EndPoint target,
                               java.util.List<java.lang.String> fileList)

forceCompaction

public void forceCompaction()

getAllSSTablesOnDisk

public java.util.List<SSTableReader> getAllSSTablesOnDisk()

get

@Deprecated
public Row get(java.lang.String key)
        throws java.io.IOException
Deprecated. 

Selects the row associated with the given key.

Throws:
java.io.IOException

get

@Deprecated
public ColumnFamily get(java.lang.String key,
                                   java.lang.String cfName)
                 throws java.io.IOException
Deprecated. 

Selects the specified column family for the specified key.

Throws:
java.io.IOException

getRow

@Deprecated
public Row getRow(java.lang.String key,
                             java.lang.String cfName)
           throws java.io.IOException
Deprecated. 

Selects only the specified column family for the specified key.

Throws:
java.io.IOException

getRow

public Row getRow(QueryFilter filter)
           throws java.io.IOException
Throws:
java.io.IOException

flush

public void flush(boolean fRecovery)
           throws java.io.IOException
Throws:
java.io.IOException

getApplicationColumnFamilies

public java.util.SortedSet<java.lang.String> getApplicationColumnFamilies()

getSnapshotPath

public static java.lang.String getSnapshotPath(java.lang.String dataDirPath,
                                               java.lang.String tableName,
                                               java.lang.String snapshotName)


Copyright © 2009 The Apache Software Foundation