org.apache.cassandra.config
Class DatabaseDescriptor

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

public class DatabaseDescriptor
extends java.lang.Object


Field Summary
static java.util.UUID INITIAL_VERSION
           
 
Constructor Summary
DatabaseDescriptor()
           
 
Method Summary
static void clearTableDefinition(KSMetaData ksm, java.util.UUID newVersion)
           
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 IAuthenticator getAuthenticator()
           
static int getBMTThreshold()
           
static CFMetaData getCFMetaData(Descriptor desc)
           
static CFMetaData getCFMetaData(java.lang.Integer cfId)
           
static CFMetaData getCFMetaData(java.lang.String tableName, java.lang.String cfName)
           
static ClockType getClockType(java.lang.String tableName, java.lang.String cfName)
           
static java.lang.String getClusterName()
           
static ColumnFamilyType getColumnFamilyType(java.lang.String tableName, java.lang.String cfName)
           
static int getColumnIndexSize()
           
static java.lang.String getCommitLogLocation()
           
static Config.CommitLogSync getCommitLogSync()
           
static double getCommitLogSyncBatchWindow()
           
static int getCommitLogSyncPeriod()
           
static AbstractType getComparator(java.lang.String compareWith)
           
static AbstractType getComparator(java.lang.String tableName, java.lang.String cfName)
           
static int getConcurrentReaders()
           
static int getConcurrentWriters()
           
static java.lang.String getConfigFileName()
           
static int getConsistencyThreads()
           
static java.lang.String getDataFileLocationForTable(java.lang.String table, long expectedCompactedFileSize)
           
static java.util.UUID getDefsVersion()
           
static Config.DiskAccessMode getDiskAccessMode()
           
static IEndpointSnitch getEndpointSnitch()
           
static int getFlushWriters()
           
static Config.DiskAccessMode getIndexAccessMode()
           
static int getIndexedReadBufferSizeInKB()
           
static java.lang.String getInitialToken()
           
static int getInMemoryCompactionLimit()
           
static java.lang.String getJobJarLocation()
           
static java.lang.String getJobTrackerAddress()
           
static int getKeysCachedFor(java.lang.String tableName, java.lang.String columnFamilyName, long expectedKeys)
           
static KSMetaData getKSMetaData(java.lang.String table)
           
static java.net.InetAddress getListenAddress()
           
static int getMemtableLifetimeMS()
           
static double getMemtableOperations()
           
static int getMemtableThroughput()
           
static java.lang.String getNextAvailableDataLocation()
           
static java.util.List<java.lang.String> getNonSystemTables()
           
static IPartitioner getPartitioner()
           
static int getPhiConvictThreshold()
           
static int getQuorum(java.lang.String table)
           
static AbstractReconciler getReconciler(java.lang.String reconcileWith)
           
static AbstractReconciler getReconciler(java.lang.String tableName, java.lang.String cfName)
           
static java.lang.Class<? extends AbstractReplicationStrategy> getReplicaPlacementStrategyClass(java.lang.String table)
           
static int getReplicationFactor(java.lang.String table)
           
static IRequestScheduler getRequestScheduler()
           
static Config.RequestSchedulerId getRequestSchedulerId()
           
static RequestSchedulerOptions getRequestSchedulerOptions()
           
static int getRowsCachedFor(java.lang.String tableName, java.lang.String columnFamilyName, long expectedRows)
           
static java.net.InetAddress getRpcAddress()
           
static int getRpcPort()
           
static long getRpcTimeout()
           
static java.util.Set<java.net.InetAddress> getSeeds()
           
static int getSlicedReadBufferSizeInKB()
           
static int getStageQueueSize()
           
static int getStoragePort()
           
static AbstractType getSubComparator(java.lang.String tableName, java.lang.String cfName)
           
static KSMetaData getTableDefinition(java.lang.String table)
           
static java.util.Map<java.lang.String,CFMetaData> getTableMetaData(java.lang.String tableName)
           
static java.util.Set<java.lang.String> getTables()
           
static int getThriftFramedTransportSize()
           
static int getThriftMaxMessageLength()
           
static AbstractType getValueValidator(java.lang.String keyspace, java.lang.String cf, byte[] column)
           
static boolean hintedHandoffEnabled()
           
static boolean isAutoBootstrap()
           
static boolean isSnapshotBeforeCompaction()
           
static boolean isThriftFramed()
           
static void loadSchemas()
           
static java.util.Collection<KSMetaData> readTablesFromYaml()
          reads xml.
static void setTableDefinition(KSMetaData ksm, java.util.UUID newVersion)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INITIAL_VERSION

public static final java.util.UUID INITIAL_VERSION
Constructor Detail

DatabaseDescriptor

public DatabaseDescriptor()
Method Detail

loadSchemas

public static void loadSchemas()
                        throws java.io.IOException
Throws:
java.io.IOException

readTablesFromYaml

public static java.util.Collection<KSMetaData> readTablesFromYaml()
                                                           throws ConfigurationException
reads xml. doesn't populate any internal structures.

Throws:
ConfigurationException

getAuthenticator

public static IAuthenticator getAuthenticator()

isThriftFramed

public static boolean isThriftFramed()

getThriftMaxMessageLength

public static int getThriftMaxMessageLength()

getThriftFramedTransportSize

public static int getThriftFramedTransportSize()

getComparator

public static AbstractType getComparator(java.lang.String compareWith)
                                  throws ConfigurationException
Throws:
ConfigurationException

getReconciler

public static AbstractReconciler getReconciler(java.lang.String reconcileWith)
                                        throws ConfigurationException
Throws:
ConfigurationException

createAllDirectories

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

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

getPartitioner

public static IPartitioner getPartitioner()

getEndpointSnitch

public static IEndpointSnitch getEndpointSnitch()

getRequestScheduler

public static IRequestScheduler getRequestScheduler()

getRequestSchedulerOptions

public static RequestSchedulerOptions getRequestSchedulerOptions()

getRequestSchedulerId

public static Config.RequestSchedulerId getRequestSchedulerId()

getReplicaPlacementStrategyClass

public static java.lang.Class<? extends AbstractReplicationStrategy> getReplicaPlacementStrategyClass(java.lang.String table)

getKSMetaData

public static KSMetaData getKSMetaData(java.lang.String table)

getJobTrackerAddress

public static java.lang.String getJobTrackerAddress()

getColumnIndexSize

public static int getColumnIndexSize()

getMemtableLifetimeMS

public static int getMemtableLifetimeMS()

getInitialToken

public static java.lang.String getInitialToken()

getMemtableThroughput

public static int getMemtableThroughput()

getMemtableOperations

public static double getMemtableOperations()

getClusterName

public static java.lang.String getClusterName()

getConfigFileName

public static java.lang.String getConfigFileName()

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)

getCFMetaData

public static CFMetaData getCFMetaData(java.lang.Integer cfId)

getColumnFamilyType

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

getClockType

public static ClockType getClockType(java.lang.String tableName,
                                     java.lang.String cfName)

getTables

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

getNonSystemTables

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

getStoragePort

public static int getStoragePort()

getRpcPort

public static int getRpcPort()

getReplicationFactor

public static int getReplicationFactor(java.lang.String table)

getQuorum

public static int getQuorum(java.lang.String table)

getRpcTimeout

public static long getRpcTimeout()

getPhiConvictThreshold

public static int getPhiConvictThreshold()

getConsistencyThreads

public static int getConsistencyThreads()

getConcurrentReaders

public static int getConcurrentReaders()

getConcurrentWriters

public static int getConcurrentWriters()

getFlushWriters

public static int getFlushWriters()

getInMemoryCompactionLimit

public static int getInMemoryCompactionLimit()

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

getCommitLogLocation

public static java.lang.String getCommitLogLocation()

getSeeds

public static java.util.Set<java.net.InetAddress> getSeeds()

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)

getStageQueueSize

public static int getStageQueueSize()

getReconciler

public static AbstractReconciler getReconciler(java.lang.String tableName,
                                               java.lang.String cfName)

getKeysCachedFor

public static int getKeysCachedFor(java.lang.String tableName,
                                   java.lang.String columnFamilyName,
                                   long expectedKeys)
Returns:
The absolute number of keys that should be cached per table.

getRowsCachedFor

public static int getRowsCachedFor(java.lang.String tableName,
                                   java.lang.String columnFamilyName,
                                   long expectedRows)
Returns:
The absolute number of rows that should be cached for the columnfamily.

getTableDefinition

public static KSMetaData getTableDefinition(java.lang.String table)

setTableDefinition

public static void setTableDefinition(KSMetaData ksm,
                                      java.util.UUID newVersion)

clearTableDefinition

public static void clearTableDefinition(KSMetaData ksm,
                                        java.util.UUID newVersion)

getDefsVersion

public static java.util.UUID getDefsVersion()

getListenAddress

public static java.net.InetAddress getListenAddress()

getRpcAddress

public static java.net.InetAddress getRpcAddress()

getCommitLogSyncBatchWindow

public static double getCommitLogSyncBatchWindow()

getCommitLogSyncPeriod

public static int getCommitLogSyncPeriod()

getCommitLogSync

public static Config.CommitLogSync getCommitLogSync()

getDiskAccessMode

public static Config.DiskAccessMode getDiskAccessMode()

getIndexAccessMode

public static Config.DiskAccessMode getIndexAccessMode()

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

hintedHandoffEnabled

public static boolean hintedHandoffEnabled()

getValueValidator

public static AbstractType getValueValidator(java.lang.String keyspace,
                                             java.lang.String cf,
                                             byte[] column)

getCFMetaData

public static CFMetaData getCFMetaData(Descriptor desc)


Copyright © 2010 The Apache Software Foundation