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 hints_
           
static java.lang.String recycleBin_
           
 
Method Summary
 void clearSnapshot()
           
 void doGC()
          Do a cleanup of keys that do not belong locally.
 void flush(boolean fRecovery)
           
 void forceCompaction()
           
 boolean forceCompaction(java.util.List<Range> ranges, EndPoint target, java.util.List<java.lang.String> fileList)
           
 Row get(java.lang.String key)
          Selects the row associated with the given key.
 ColumnFamily get(java.lang.String key, java.lang.String cf)
          Selects the specified column family for the specified key.
 java.util.List<java.lang.String> getAllSSTablesOnDisk()
           
 java.util.SortedSet<java.lang.String> getApplicationColumnFamilies()
           
 java.util.Set<java.lang.String> getColumnFamilies()
           
 ColumnFamilyStore getColumnFamilyStore(java.lang.String cfName)
           
 java.util.List<java.lang.String> getKeyRange(java.lang.String startWith, java.lang.String stopAt, int maxResults)
           
 Row getRow(java.lang.String key, java.lang.String cf)
          Selects only the specified column family for the specified key.
 Row getRow(java.lang.String key, java.lang.String cf, int start, int count)
          Selects only the specified column family for the specified key.
 Row getRow(java.lang.String key, java.lang.String cf, java.util.List<java.lang.String> columns)
          This method returns the specified columns for the specified column family.
 Row getRow(java.lang.String key, java.lang.String cf, long sinceTimeStamp)
           
static Table open(java.lang.String table)
           
 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

recycleBin_

public static final java.lang.String recycleBin_
See Also:
Constant Field Values

hints_

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

open

public static Table open(java.lang.String table)

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)

doGC

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


clearSnapshot

public void clearSnapshot()

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<java.lang.String> getAllSSTablesOnDisk()

get

public Row get(java.lang.String key)
        throws java.io.IOException
Selects the row associated with the given key.

Throws:
java.io.IOException

get

public ColumnFamily get(java.lang.String key,
                        java.lang.String cf)
                 throws java.io.IOException
Selects the specified column family for the specified key.

Throws:
java.io.IOException

getRow

public Row getRow(java.lang.String key,
                  java.lang.String cf)
           throws java.io.IOException
Selects only the specified column family for the specified key.

Throws:
java.io.IOException

getRow

public Row getRow(java.lang.String key,
                  java.lang.String cf,
                  int start,
                  int count)
           throws java.io.IOException
Selects only the specified column family for the specified key.

Throws:
java.io.IOException

getRow

public Row getRow(java.lang.String key,
                  java.lang.String cf,
                  long sinceTimeStamp)
           throws java.io.IOException
Throws:
java.io.IOException

getRow

public Row getRow(java.lang.String key,
                  java.lang.String cf,
                  java.util.List<java.lang.String> columns)
           throws java.io.IOException
This method returns the specified columns for the specified column family. param @ key - key for which data is requested. param @ cf - column family we are interested in. param @ columns - columns that are part of the above column family.

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()

getKeyRange

public java.util.List<java.lang.String> getKeyRange(java.lang.String startWith,
                                                    java.lang.String stopAt,
                                                    int maxResults)
                                             throws java.io.IOException,
                                                    java.util.concurrent.ExecutionException,
                                                    java.lang.InterruptedException
Parameters:
startWith - key to start with, inclusive. empty string = start at beginning.
stopAt - key to stop at, inclusive. empty string = stop only when keys are exhausted.
maxResults -
Returns:
list of keys between startWith and stopAt
Throws:
java.io.IOException
java.util.concurrent.ExecutionException
java.lang.InterruptedException


Copyright © 2009 The Apache Software Foundation