org.apache.cassandra.config
Class DatabaseDescriptor

java.lang.Object
  extended by org.apache.cassandra.config.DatabaseDescriptor

public class DatabaseDescriptor
extends java.lang.Object


Nested Class Summary
static class DatabaseDescriptor.CommitLogSync
           
 
Field Summary
static java.lang.String ophf_
           
static java.lang.String random_
           
 
Constructor Summary
DatabaseDescriptor()
           
 
Method Summary
static void createTableDirectories()
          Create the table directory in each data directory
static java.lang.String[] getAllDataFileLocations()
           
static java.lang.String[] getAllDataFileLocationsForTable(java.lang.String table)
          Get a list of data directories for a given table
static int getBMTThreshold()
           
static java.lang.String getBootstrapFileLocation()
           
static CFMetaData getCFMetaData(java.lang.String tableName, java.lang.String cfName)
           
static java.lang.String getClusterName()
           
static java.lang.String getColumnFamilyType(java.lang.String tableName, java.lang.String cfName)
           
static int getColumnIndexSize()
           
static java.lang.String getColumnType(java.lang.String tableName, java.lang.String cfName)
           
static DatabaseDescriptor.CommitLogSync getCommitLogSync()
           
static double getCommitLogSyncBatchWindow()
           
static int getCommitLogSyncPeriod()
           
static AbstractType getComparator(java.lang.String tableName, java.lang.String cfName)
           
static int getConcurrentReaders()
           
static int getConcurrentWriters()
           
static java.lang.String getConfigFileName()
           
static boolean getConsistencyCheck()
           
static int getConsistencyThreads()
           
static int getControlPort()
           
static java.lang.String getDataFileLocationForTable(java.lang.String table)
           
static java.lang.String getDataFileLocationForTable(java.lang.String table, long expectedCompactedFileSize)
           
static IEndPointSnitch getEndPointSnitch()
           
static double getFlushDataBufferSizeInMB()
           
static double getFlushIndexBufferSizeInMB()
           
static int getFlushMaxThreads()
           
static int getFlushMinThreads()
           
static int getFlushPeriod(java.lang.String tableName, java.lang.String columnFamilyName)
           
static int getGcGraceInSeconds()
           
static int getIndexedReadBufferSizeInKB()
           
static java.lang.String getInitialToken()
           
static java.lang.String getJobJarLocation()
           
static java.lang.String getJobTrackerAddress()
           
static java.lang.String getListenAddress()
           
static java.lang.String getLogFileLocation()
           
static int getMemtableLifetime()
           
static double getMemtableObjectCount()
           
static int getMemtableSize()
           
static IPartitioner getPartitioner()
           
static int getQuorum()
           
static java.lang.Class getReplicaPlacementStrategyClass()
           
static int getReplicationFactor()
           
static long getRpcTimeout()
           
static java.util.Set<java.lang.String> getSeeds()
           
static int getSlicedReadBufferSizeInKB()
           
static int getStoragePort()
           
static AbstractType getSubComparator(java.lang.String tableName, java.lang.String cfName)
           
static java.lang.String getTable(java.lang.String tableName)
           
static java.util.Map<java.lang.String,CFMetaData> getTableMetaData(java.lang.String tableName)
           
static java.util.List<java.lang.String> getTables()
           
static java.util.Map<java.lang.String,java.util.Map<java.lang.String,CFMetaData>> getTableToColumnFamilyMap()
           
static java.lang.String getThriftAddress()
           
static int getThriftPort()
           
static boolean isApplicationColumnFamily(java.lang.String columnFamily)
           
static boolean isSnapshotBeforeCompaction()
           
static boolean isThriftFramed()
           
static void setBootstrapFileLocation(java.lang.String bfLocation)
           
static void setLogFileLocation(java.lang.String logLocation)
           
static void setTables(java.lang.String table)
           
static void storeMetadata()
          Create the metadata tables.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

random_

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

ophf_

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

DatabaseDescriptor

public DatabaseDescriptor()
Method Detail

isThriftFramed

public static boolean isThriftFramed()

createTableDirectories

public static void createTableDirectories()
                                   throws java.io.IOException
Create the table directory in each data directory

Throws:
java.io.IOException

storeMetadata

public static void storeMetadata()
                          throws java.io.IOException
Create the metadata tables. This table has information about the table name and the column families that make up the table. Each column family also has an associated ID which is an int.

Throws:
java.io.IOException

getGcGraceInSeconds

public static int getGcGraceInSeconds()

getPartitioner

public static IPartitioner getPartitioner()

getEndPointSnitch

public static IEndPointSnitch getEndPointSnitch()

getReplicaPlacementStrategyClass

public static java.lang.Class getReplicaPlacementStrategyClass()

getJobTrackerAddress

public static java.lang.String getJobTrackerAddress()

getColumnIndexSize

public static int getColumnIndexSize()

getMemtableLifetime

public static int getMemtableLifetime()

getInitialToken

public static java.lang.String getInitialToken()

getMemtableSize

public static int getMemtableSize()

getMemtableObjectCount

public static double getMemtableObjectCount()

getConsistencyCheck

public static boolean getConsistencyCheck()

getClusterName

public static java.lang.String getClusterName()

getConfigFileName

public static java.lang.String getConfigFileName()

isApplicationColumnFamily

public static boolean isApplicationColumnFamily(java.lang.String columnFamily)

getJobJarLocation

public static java.lang.String getJobJarLocation()

getTableMetaData

public static java.util.Map<java.lang.String,CFMetaData> getTableMetaData(java.lang.String tableName)

getCFMetaData

public static CFMetaData getCFMetaData(java.lang.String tableName,
                                       java.lang.String cfName)

getColumnType

public static java.lang.String getColumnType(java.lang.String tableName,
                                             java.lang.String cfName)

getFlushPeriod

public static int getFlushPeriod(java.lang.String tableName,
                                 java.lang.String columnFamilyName)

getTables

public static java.util.List<java.lang.String> getTables()

getTable

public static java.lang.String getTable(java.lang.String tableName)

setTables

public static void setTables(java.lang.String table)

getStoragePort

public static int getStoragePort()

getControlPort

public static int getControlPort()

getThriftPort

public static int getThriftPort()

getReplicationFactor

public static int getReplicationFactor()

getQuorum

public static int getQuorum()

getRpcTimeout

public static long getRpcTimeout()

getConsistencyThreads

public static int getConsistencyThreads()

getConcurrentReaders

public static int getConcurrentReaders()

getConcurrentWriters

public static int getConcurrentWriters()

getAllDataFileLocations

public static java.lang.String[] getAllDataFileLocations()

getAllDataFileLocationsForTable

public static java.lang.String[] getAllDataFileLocationsForTable(java.lang.String table)
Get a list of data directories for a given table

Parameters:
table - name of the table.
Returns:
an array of path to the data directories.

getDataFileLocationForTable

public static java.lang.String getDataFileLocationForTable(java.lang.String table)

getBootstrapFileLocation

public static java.lang.String getBootstrapFileLocation()

setBootstrapFileLocation

public static void setBootstrapFileLocation(java.lang.String bfLocation)

getLogFileLocation

public static java.lang.String getLogFileLocation()

setLogFileLocation

public static void setLogFileLocation(java.lang.String logLocation)

getSeeds

public static java.util.Set<java.lang.String> getSeeds()

getColumnFamilyType

public static java.lang.String getColumnFamilyType(java.lang.String tableName,
                                                   java.lang.String cfName)

getDataFileLocationForTable

public static java.lang.String getDataFileLocationForTable(java.lang.String table,
                                                           long expectedCompactedFileSize)

getComparator

public static AbstractType getComparator(java.lang.String tableName,
                                         java.lang.String cfName)

getSubComparator

public static AbstractType getSubComparator(java.lang.String tableName,
                                            java.lang.String cfName)

getTableToColumnFamilyMap

public static java.util.Map<java.lang.String,java.util.Map<java.lang.String,CFMetaData>> getTableToColumnFamilyMap()

getListenAddress

public static java.lang.String getListenAddress()

getThriftAddress

public static java.lang.String getThriftAddress()

getCommitLogSyncBatchWindow

public static double getCommitLogSyncBatchWindow()

getCommitLogSyncPeriod

public static int getCommitLogSyncPeriod()

getCommitLogSync

public static DatabaseDescriptor.CommitLogSync getCommitLogSync()

getFlushDataBufferSizeInMB

public static double getFlushDataBufferSizeInMB()

getFlushIndexBufferSizeInMB

public static double getFlushIndexBufferSizeInMB()

getIndexedReadBufferSizeInKB

public static int getIndexedReadBufferSizeInKB()

getSlicedReadBufferSizeInKB

public static int getSlicedReadBufferSizeInKB()

getFlushMinThreads

public static int getFlushMinThreads()

getFlushMaxThreads

public static int getFlushMaxThreads()

getBMTThreshold

public static int getBMTThreshold()

isSnapshotBeforeCompaction

public static boolean isSnapshotBeforeCompaction()


Copyright © 2009 The Apache Software Foundation