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_
           
static java.lang.String STREAMING_SUBDIR
           
 
Constructor Summary
DatabaseDescriptor()
           
 
Method Summary
static void createAllDirectories()
          Creates all storage-related directories.
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 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, long expectedCompactedFileSize)
           
static IEndPointSnitch getEndPointSnitch()
           
static double getFlushDataBufferSizeInMB()
           
static double getFlushIndexBufferSizeInMB()
           
static int getGcGraceInSeconds()
           
static int getIndexedReadBufferSizeInKB()
           
static java.lang.String getInitialToken()
           
static java.lang.String getJobJarLocation()
           
static java.lang.String getJobTrackerAddress()
           
static double getKeysCachedFraction(java.lang.String tableName)
           
static java.net.InetAddress getListenAddress()
           
static java.lang.String getLogFileLocation()
           
static int getMemtableLifetimeMS()
           
static double getMemtableObjectCount()
           
static int getMemtableSize()
           
static java.lang.String getNextAvailableDataLocation()
           
static java.util.List<java.lang.String> getNonSystemTables()
           
static IPartitioner getPartitioner()
           
static int getQuorum()
           
static java.lang.Class<AbstractReplicationStrategy> getReplicaPlacementStrategyClass()
           
static int getReplicationFactor()
           
static long getRpcTimeout()
           
static java.util.Set<java.net.InetAddress> 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.net.InetAddress getThriftAddress()
           
static int getThriftPort()
           
static boolean isApplicationColumnFamily(java.lang.String columnFamily)
           
static boolean isAutoBootstrap()
           
static boolean isSnapshotBeforeCompaction()
           
static boolean isThriftFramed()
           
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

STREAMING_SUBDIR

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

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

createAllDirectories

public static void createAllDirectories()
                                 throws java.io.IOException
Creates all storage-related directories.

Throws:
java.io.IOException - when a disk problem is encountered.

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

getJobTrackerAddress

public static java.lang.String getJobTrackerAddress()

getColumnIndexSize

public static int getColumnIndexSize()

getMemtableLifetimeMS

public static int getMemtableLifetimeMS()

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)

getTables

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

getNonSystemTables

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

getTable

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

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.

getNextAvailableDataLocation

public static java.lang.String getNextAvailableDataLocation()

getLogFileLocation

public static java.lang.String getLogFileLocation()

getSeeds

public static java.util.Set<java.net.InetAddress> 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()

getKeysCachedFraction

public static double getKeysCachedFraction(java.lang.String tableName)

getListenAddress

public static java.net.InetAddress getListenAddress()

getThriftAddress

public static java.net.InetAddress 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()

getBMTThreshold

public static int getBMTThreshold()

isSnapshotBeforeCompaction

public static boolean isSnapshotBeforeCompaction()

isAutoBootstrap

public static boolean isAutoBootstrap()


Copyright © 2010 The Apache Software Foundation