org.apache.cassandra.config
Class DatabaseDescriptor
java.lang.Object
org.apache.cassandra.config.DatabaseDescriptor
public class DatabaseDescriptor
- extends java.lang.Object
Method Summary |
static void |
clearTableDefinition(KSMetaData ksm,
java.util.UUID newVersion)
|
static void |
createAllDirectories()
Creates all storage-related directories. |
static boolean |
estimatesRealMemtableSize()
|
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 IAuthority |
getAuthority()
|
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 java.lang.String |
getClusterName()
|
static ColumnFamilyType |
getColumnFamilyType(java.lang.String tableName,
java.lang.String cfName)
|
static int |
getColumnIndexSize()
|
static java.lang.String |
getCommitLogLocation()
|
static int |
getCommitLogSegmentSize()
|
static Config.CommitLogSync |
getCommitLogSync()
|
static double |
getCommitLogSyncBatchWindow()
|
static int |
getCommitLogSyncPeriod()
|
static int |
getCompactionThreadPriority()
|
static int |
getCompactionThroughputMbPerSec()
|
static AbstractType |
getComparator(java.lang.String ksName,
java.lang.String cfName)
|
static int |
getConcurrentCompactors()
|
static int |
getConcurrentReaders()
|
static int |
getConcurrentReplicators()
|
static int |
getConcurrentWriters()
|
static java.lang.String |
getDataFileLocationForTable(java.lang.String table,
long expectedCompactedFileSize)
|
static java.util.UUID |
getDefsVersion()
|
static Config.DiskAccessMode |
getDiskAccessMode()
|
static double |
getDynamicBadnessThreshold()
|
static int |
getDynamicResetInterval()
|
static int |
getDynamicUpdateInterval()
|
static EncryptionOptions |
getEncryptionOptions()
|
static IEndpointSnitch |
getEndpointSnitch()
|
static double |
getFlushLargestMemtablesAt()
|
static int |
getFlushQueueSize()
|
static int |
getFlushWriters()
|
static int |
getHintedHandoffThrottleDelay()
|
static Config.DiskAccessMode |
getIndexAccessMode()
|
static int |
getIndexedReadBufferSizeInKB()
|
static java.lang.Integer |
getIndexInterval()
|
static java.lang.String |
getInitialToken()
|
static int |
getInMemoryCompactionLimit()
|
static java.lang.String |
getJobJarLocation()
|
static java.lang.String |
getJobTrackerAddress()
|
static KSMetaData |
getKSMetaData(java.lang.String table)
|
static java.net.InetAddress |
getListenAddress()
|
static int |
getMaxHintWindow()
|
static java.lang.String |
getNextAvailableDataLocation()
|
static java.util.List<java.lang.String> |
getNonSystemTables()
|
static IPartitioner |
getPartitioner()
|
static int |
getPhiConvictThreshold()
|
static boolean |
getPreheatKeyCache()
|
static double |
getReduceCacheCapacityTo()
|
static double |
getReduceCacheSizesAt()
|
static IRequestScheduler |
getRequestScheduler()
|
static Config.RequestSchedulerId |
getRequestSchedulerId()
|
static RequestSchedulerOptions |
getRequestSchedulerOptions()
|
static java.net.InetAddress |
getRpcAddress()
|
static boolean |
getRpcKeepAlive()
|
static java.lang.Integer |
getRpcMaxThreads()
|
static java.lang.Integer |
getRpcMinThreads()
|
static int |
getRpcPort()
|
static java.lang.Integer |
getRpcRecvBufferSize()
|
static java.lang.Integer |
getRpcSendBufferSize()
|
static long |
getRpcTimeout()
|
static java.lang.String |
getSavedCachesLocation()
|
static java.util.Set<java.net.InetAddress> |
getSeeds()
|
static java.io.File |
getSerializedCachePath(java.lang.String ksName,
java.lang.String cfName,
ColumnFamilyStore.CacheType cacheType)
|
static int |
getSlicedReadBufferSizeInKB()
|
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 int |
getTotalMemtableSpaceInMB()
|
static AbstractType |
getValueValidator(java.lang.String keyspace,
java.lang.String cf,
java.nio.ByteBuffer column)
|
static boolean |
hintedHandoffEnabled()
|
static boolean |
incrementalBackupsEnabled()
|
static boolean |
isAutoBootstrap()
|
static boolean |
isSnapshotBeforeCompaction()
|
static void |
loadSchemas()
load keyspace (table) definitions, but do not initialize the table instances. |
static void |
setCompactionThroughputMbPerSec(int value)
|
static void |
setDynamicBadnessThreshold(java.lang.Double dynamicBadnessThreshold)
|
static void |
setDynamicResetInterval(java.lang.Integer dynamicResetInterval)
|
static void |
setDynamicUpdateInterval(java.lang.Integer dynamicUpdateInterval)
|
static void |
setEndpointSnitch(IEndpointSnitch eps)
|
static void |
setTableDefinition(KSMetaData ksm,
java.util.UUID newVersion)
|
static void |
validateMemtableFlushPeriod(int minutes)
|
static void |
validateMemtableOperations(double operationsInMillions)
|
static void |
validateMemtableThroughput(int sizeInMB)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INITIAL_VERSION
public static final java.util.UUID INITIAL_VERSION
DatabaseDescriptor
public DatabaseDescriptor()
loadSchemas
public static void loadSchemas()
throws java.io.IOException
- load keyspace (table) definitions, but do not initialize the table instances.
- Throws:
java.io.IOException
getAuthenticator
public static IAuthenticator getAuthenticator()
getAuthority
public static IAuthority getAuthority()
getThriftMaxMessageLength
public static int getThriftMaxMessageLength()
getThriftFramedTransportSize
public static int getThriftFramedTransportSize()
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()
setEndpointSnitch
public static void setEndpointSnitch(IEndpointSnitch eps)
getRequestScheduler
public static IRequestScheduler getRequestScheduler()
getRequestSchedulerOptions
public static RequestSchedulerOptions getRequestSchedulerOptions()
getRequestSchedulerId
public static Config.RequestSchedulerId getRequestSchedulerId()
getKSMetaData
public static KSMetaData getKSMetaData(java.lang.String table)
getJobTrackerAddress
public static java.lang.String getJobTrackerAddress()
getColumnIndexSize
public static int getColumnIndexSize()
getInitialToken
public static java.lang.String getInitialToken()
getClusterName
public static java.lang.String getClusterName()
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)
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()
getRpcTimeout
public static long getRpcTimeout()
getPhiConvictThreshold
public static int getPhiConvictThreshold()
getConcurrentReaders
public static int getConcurrentReaders()
getConcurrentWriters
public static int getConcurrentWriters()
getConcurrentReplicators
public static int getConcurrentReplicators()
getFlushWriters
public static int getFlushWriters()
getInMemoryCompactionLimit
public static int getInMemoryCompactionLimit()
getConcurrentCompactors
public static int getConcurrentCompactors()
getCompactionThroughputMbPerSec
public static int getCompactionThroughputMbPerSec()
setCompactionThroughputMbPerSec
public static void setCompactionThroughputMbPerSec(int value)
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()
getCommitLogSegmentSize
public static int getCommitLogSegmentSize()
getCommitLogLocation
public static java.lang.String getCommitLogLocation()
getSavedCachesLocation
public static java.lang.String getSavedCachesLocation()
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 ksName,
java.lang.String cfName)
getSubComparator
public static AbstractType getSubComparator(java.lang.String tableName,
java.lang.String cfName)
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()
getRpcKeepAlive
public static boolean getRpcKeepAlive()
getRpcMinThreads
public static java.lang.Integer getRpcMinThreads()
getRpcMaxThreads
public static java.lang.Integer getRpcMaxThreads()
getRpcSendBufferSize
public static java.lang.Integer getRpcSendBufferSize()
getRpcRecvBufferSize
public static java.lang.Integer getRpcRecvBufferSize()
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()
getCompactionThreadPriority
public static int getCompactionThreadPriority()
isSnapshotBeforeCompaction
public static boolean isSnapshotBeforeCompaction()
isAutoBootstrap
public static boolean isAutoBootstrap()
hintedHandoffEnabled
public static boolean hintedHandoffEnabled()
getMaxHintWindow
public static int getMaxHintWindow()
getValueValidator
public static AbstractType getValueValidator(java.lang.String keyspace,
java.lang.String cf,
java.nio.ByteBuffer column)
getCFMetaData
public static CFMetaData getCFMetaData(Descriptor desc)
getIndexInterval
public static java.lang.Integer getIndexInterval()
getSerializedCachePath
public static java.io.File getSerializedCachePath(java.lang.String ksName,
java.lang.String cfName,
ColumnFamilyStore.CacheType cacheType)
getDynamicUpdateInterval
public static int getDynamicUpdateInterval()
setDynamicUpdateInterval
public static void setDynamicUpdateInterval(java.lang.Integer dynamicUpdateInterval)
getDynamicResetInterval
public static int getDynamicResetInterval()
setDynamicResetInterval
public static void setDynamicResetInterval(java.lang.Integer dynamicResetInterval)
getDynamicBadnessThreshold
public static double getDynamicBadnessThreshold()
setDynamicBadnessThreshold
public static void setDynamicBadnessThreshold(java.lang.Double dynamicBadnessThreshold)
getEncryptionOptions
public static EncryptionOptions getEncryptionOptions()
getFlushLargestMemtablesAt
public static double getFlushLargestMemtablesAt()
getReduceCacheSizesAt
public static double getReduceCacheSizesAt()
getReduceCacheCapacityTo
public static double getReduceCacheCapacityTo()
getHintedHandoffThrottleDelay
public static int getHintedHandoffThrottleDelay()
getPreheatKeyCache
public static boolean getPreheatKeyCache()
validateMemtableThroughput
public static void validateMemtableThroughput(int sizeInMB)
throws ConfigurationException
- Throws:
ConfigurationException
validateMemtableOperations
public static void validateMemtableOperations(double operationsInMillions)
throws ConfigurationException
- Throws:
ConfigurationException
validateMemtableFlushPeriod
public static void validateMemtableFlushPeriod(int minutes)
throws ConfigurationException
- Throws:
ConfigurationException
incrementalBackupsEnabled
public static boolean incrementalBackupsEnabled()
getFlushQueueSize
public static int getFlushQueueSize()
getTotalMemtableSpaceInMB
public static int getTotalMemtableSpaceInMB()
estimatesRealMemtableSize
public static boolean estimatesRealMemtableSize()
Copyright © 2011 The Apache Software Foundation