org.apache.cassandra.config
Class CFMetaData
java.lang.Object
org.apache.cassandra.config.CFMetaData
public final class CFMetaData
- extends java.lang.Object
Constructor Summary |
CFMetaData(java.lang.String tableName,
java.lang.String cfName,
ColumnFamilyType cfType,
AbstractType comparator,
AbstractType subcolumnComparator,
java.lang.String comment,
double rowCacheSize,
double keyCacheSize,
double readRepairChance,
int gcGraceSeconds,
AbstractType defaultValidator,
int minCompactionThreshold,
int maxCompactionThreshold,
int rowCacheSavePeriodInSeconds,
int keyCacheSavePeriodInSeconds,
int memTime,
java.lang.Integer memSize,
java.lang.Double memOps,
java.util.Map<java.nio.ByteBuffer,ColumnDefinition> column_metadata)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
DEFAULT_ROW_CACHE_SIZE
public static final double DEFAULT_ROW_CACHE_SIZE
- See Also:
- Constant Field Values
DEFAULT_KEY_CACHE_SIZE
public static final double DEFAULT_KEY_CACHE_SIZE
- See Also:
- Constant Field Values
DEFAULT_READ_REPAIR_CHANCE
public static final double DEFAULT_READ_REPAIR_CHANCE
- See Also:
- Constant Field Values
DEFAULT_ROW_CACHE_SAVE_PERIOD_IN_SECONDS
public static final int DEFAULT_ROW_CACHE_SAVE_PERIOD_IN_SECONDS
- See Also:
- Constant Field Values
DEFAULT_KEY_CACHE_SAVE_PERIOD_IN_SECONDS
public static final int DEFAULT_KEY_CACHE_SAVE_PERIOD_IN_SECONDS
- See Also:
- Constant Field Values
DEFAULT_GC_GRACE_SECONDS
public static final int DEFAULT_GC_GRACE_SECONDS
- See Also:
- Constant Field Values
DEFAULT_MIN_COMPACTION_THRESHOLD
public static final int DEFAULT_MIN_COMPACTION_THRESHOLD
- See Also:
- Constant Field Values
DEFAULT_MAX_COMPACTION_THRESHOLD
public static final int DEFAULT_MAX_COMPACTION_THRESHOLD
- See Also:
- Constant Field Values
DEFAULT_MEMTABLE_LIFETIME_IN_MINS
public static final int DEFAULT_MEMTABLE_LIFETIME_IN_MINS
- See Also:
- Constant Field Values
DEFAULT_MEMTABLE_THROUGHPUT_IN_MB
public static final int DEFAULT_MEMTABLE_THROUGHPUT_IN_MB
DEFAULT_MEMTABLE_OPERATIONS_IN_MILLIONS
public static final double DEFAULT_MEMTABLE_OPERATIONS_IN_MILLIONS
StatusCf
public static final CFMetaData StatusCf
HintsCf
public static final CFMetaData HintsCf
MigrationsCf
public static final CFMetaData MigrationsCf
SchemaCf
public static final CFMetaData SchemaCf
IndexCf
public static final CFMetaData IndexCf
cfId
public final java.lang.Integer cfId
tableName
public final java.lang.String tableName
cfName
public final java.lang.String cfName
cfType
public final ColumnFamilyType cfType
comparator
public final AbstractType comparator
subcolumnComparator
public final AbstractType subcolumnComparator
comment
public final java.lang.String comment
rowCacheSize
public final double rowCacheSize
keyCacheSize
public final double keyCacheSize
readRepairChance
public final double readRepairChance
gcGraceSeconds
public final int gcGraceSeconds
defaultValidator
public final AbstractType defaultValidator
minCompactionThreshold
public final java.lang.Integer minCompactionThreshold
maxCompactionThreshold
public final java.lang.Integer maxCompactionThreshold
rowCacheSavePeriodInSeconds
public final int rowCacheSavePeriodInSeconds
keyCacheSavePeriodInSeconds
public final int keyCacheSavePeriodInSeconds
memtableFlushAfterMins
public final int memtableFlushAfterMins
memtableThroughputInMb
public final int memtableThroughputInMb
memtableOperationsInMillions
public final double memtableOperationsInMillions
column_metadata
public final java.util.Map<java.nio.ByteBuffer,ColumnDefinition> column_metadata
CFMetaData
public CFMetaData(java.lang.String tableName,
java.lang.String cfName,
ColumnFamilyType cfType,
AbstractType comparator,
AbstractType subcolumnComparator,
java.lang.String comment,
double rowCacheSize,
double keyCacheSize,
double readRepairChance,
int gcGraceSeconds,
AbstractType defaultValidator,
int minCompactionThreshold,
int maxCompactionThreshold,
int rowCacheSavePeriodInSeconds,
int keyCacheSavePeriodInSeconds,
int memTime,
java.lang.Integer memSize,
java.lang.Double memOps,
java.util.Map<java.nio.ByteBuffer,ColumnDefinition> column_metadata)
sizeMemtableThroughput
public static int sizeMemtableThroughput()
- Returns:
- A calculated memtable throughput size for this machine.
sizeMemtableOperations
public static double sizeMemtableOperations(int mem_throughput)
- Returns:
- A calculated memtable operation count for this machine.
getCF
public static Pair<java.lang.String,java.lang.String> getCF(java.lang.Integer cfId)
- Returns:
- The (ksname,cfname) pair for the given id, or null if it has been dropped.
getId
public static java.lang.Integer getId(java.lang.String table,
java.lang.String cfName)
- Returns:
- The id for the given (ksname,cfname) pair, or null if it has been dropped.
fixMaxId
public static void fixMaxId()
map
public static void map(CFMetaData cfm)
throws ConfigurationException
- adds this cfm to the map.
- Throws:
ConfigurationException
newIndexMetadata
public static CFMetaData newIndexMetadata(java.lang.String table,
java.lang.String parentCf,
ColumnDefinition info,
AbstractType columnComparator)
rename
public static CFMetaData rename(CFMetaData cfm,
java.lang.String newName)
- clones an existing CFMetaData using the same id.
renameTable
public static CFMetaData renameTable(CFMetaData cfm,
java.lang.String tableName)
- clones existing CFMetaData. keeps the id but changes the table name.
purge
public static void purge(CFMetaData cfm)
- used for evicting cf data out of static tracking collections.
deflate
public org.apache.cassandra.avro.CfDef deflate()
inflate
public static CFMetaData inflate(org.apache.cassandra.avro.CfDef cf)
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
getValueValidator
public AbstractType getValueValidator(java.nio.ByteBuffer column)
apply
public CFMetaData apply(org.apache.cassandra.avro.CfDef cf_def)
throws ConfigurationException
- Throws:
ConfigurationException
apply
public CFMetaData apply(CfDef cf_def)
throws ConfigurationException
- Throws:
ConfigurationException
convertToThrift
public static CfDef convertToThrift(CFMetaData cfm)
convertToAvro
public static org.apache.cassandra.avro.CfDef convertToAvro(CFMetaData cfm)
validateMinMaxCompactionThresholds
public static void validateMinMaxCompactionThresholds(CfDef cf_def)
throws ConfigurationException
- Throws:
ConfigurationException
validateMinMaxCompactionThresholds
public static void validateMinMaxCompactionThresholds(org.apache.cassandra.avro.CfDef cf_def)
throws ConfigurationException
- Throws:
ConfigurationException
validateMemtableSettings
public static void validateMemtableSettings(CfDef cf_def)
throws ConfigurationException
- Throws:
ConfigurationException
validateMemtableSettings
public static void validateMemtableSettings(org.apache.cassandra.avro.CfDef cf_def)
throws ConfigurationException
- Throws:
ConfigurationException
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 2010 The Apache Software Foundation