Cassandra file structure - how are the files used?

前端 未结 2 1835
梦谈多话
梦谈多话 2021-01-31 18:57

When experimenting with Cassandra I\'ve observed that Cassandra writes to the following files:

/.../cassandra/commitlog/CommitLog-.log
/.../cassandra/d         


        
2条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-31 19:48

    A write to a Cassandra node first hits the CommitLog (sequential). (Then Cassandra stores values to column-family specific, in-memory data structures called Memtables. The Memtables are flushed to disk whenever one of the configurable thresholds is exceeded. (1, datasize in memtable. 2, # of objects reach certain limit, 3, lifetime of a memtable expires.))

    The data folder contains a subfolder for each keyspace. Each subfolder contains three kind of files:

    • Data files: An SSTable (nomenclature borrowed from Google) stands for Sorted Strings Table and is a file of key-value string pairs (sorted by keys).
    • Index file: (Key, offset) pairs (points into data file)
    • Bloom filter: all keys in data file

提交回复
热议问题