cassandra - Cassandra 在压实过程中会做什么?

标签 cassandra immutability tombstone stream-compaction

我知道cassandra合并了sstables,row-key,删除墓碑和所有东西。

  • 但是我真的很想知道它如何执行压缩?
  • 由于sstables是不可变的,是否会将所有相关数据复制到新文件中?在写入此新文件时,它会丢弃标记为逻辑删除的数据。

  • 我知道压缩的作用,但想知道它是如何实现的(T)

    最佳答案

    如果您关注其中的所有帖子和评论,希望此主题对您有所帮助

    http://comments.gmane.org/gmane.comp.db.cassandra.user/10577

    据我所知

    Whenever memtable is flushed from memory to disk they are just appended[Not updated] to new SSTable created, sorted via rowkey.
    SSTable merge[updation] will take place only during compaction. 
    Till then read path will read from all the SSTable having that key you look up and the result from them is merged to reply back,
    
    Two types : Minor and Major
    
    Minor compaction is triggered automatically whenever a new sstable is being created.
    May remove all tombstones
    Compacts sstables of equal size in to one [initially memtable flush size] when minor compaction threshold is reached [4 by default]. 
    
    Major Compaction is manually triggered using nodetool
    Can be applied over a column family over a time
    Compacts all the sstables of a CF in to 1
    
    Compacts the SSTables and marks delete over unneeded SSTables. GC takes care of freeing up that space
    

    问候,
    泰米尔语

    关于cassandra - Cassandra 在压实过程中会做什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7633082/

    相关文章:

    lucene - Solandra 与 ElasticSearch

    hibernate - 使用Hibernate将可变转换为不可变

    java - 如何在 Vaadin 中编辑不可变对象(immutable对象)列表?

    java - guava的ImmutableXXX真的是不可变的吗?

    cassandra - Cassandra 的墓碑物理位置

    android - 使用带有 Room 的 ForeignKey 的墓碑

    Cassandra :告密者与流言蜚语

    java - Cassandra 一致性级别规则

    sorting - Cassandra 按计数对结果排序