incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From samal <sa...@wakya.in>
Subject Re: Memtables stored in which location
Date Thu, 21 Jul 2011 10:41:11 GMT
Any ways , some where memtable has to be stored right, like we say memtable
data is flushed to create sstable on disk.

> Exactly from which location or memory it will be getting from. is it like
> an objects streams or like it is storing the values in commitlog.
>

A Memtable is Cassandra's in-memory representation of key/value pairs.


> my next question is , data is written to commit log. all the data is
> available here, and the sstable are getting created on disk, then where and
> when these memtables are coming into picture


Commitlog is append only file which record write sequentially, more[2], can
be thought as check sum file, which to used to recalculate data for
memtables in case of crash.
A write first hits the *CommitLog*, then Cassandra stores/writes values to
in-memory data structures called Memtables. The Memtables are flushed to
disk whenever one of the configurable thresholds is met.[3]
<http://wiki.apache.org/cassandra/MemtableThresholds>
For each column family there is corresponding memtable.
There is generally one commitlog file for all CF.

SSTables are immutable once written to disk cannot be modified. It will only
be replaced by new SSTable after compaction


[1]http://wiki.apache.org/cassandra/ArchitectureOverview
[2]http://wiki.apache.org/cassandra/ArchitectureCommitLog
[3]http://wiki.apache.org/cassandra/MemtableThresholds

Mime
View raw message