卡桑德拉收集墓碑

nmakb

我创建了一个带有集合的表。插入一条记录并对其进行sstabledump,并在sstable中看到它的范围逻辑删除。这个墓碑会不会被移除?另外,当我在唯一一个sstable上运行sstablemetadata时,它显示“估计的可放置逻辑删除的墓碑”为0.5”,类似地,它还显示了一个以大纪元时间作为插入时间的记录-“估计的可放置逻辑删除的墓碑时间:1548384720:1”。我在具有集合的表上执行sstablemetadata,由于集合/列表范围的墓碑,估计的可丢弃逻辑删除比率和丢弃时间值不是真实且可靠的值吗?

CREATE TABLE ks.nmtest (
    reservation_id text,
    order_id text,
    c1 int,
    order_details map<text, text>,
    PRIMARY KEY (reservation_id, order_id)
) WITH CLUSTERING ORDER BY (order_id ASC)

user@cqlsh:ks> insert into nmtest (reservation_id , order_id , c1, order_details ) values('3','3',3,{'key':'value'});
user@cqlsh:ks> select * from nmtest ;
 reservation_id | order_id | c1 | order_details
----------------+----------+----+------------------
              3 |        3 |  3 | {'key': 'value'}
(1 rows)

[root@localhost nmtest-e1302500201d11e983bb693c02c04c62]# sstabledump mc-5-big-Data.db 
WARN  02:52:19,596 memtable_cleanup_threshold has been deprecated and should be removed from cassandra.yaml
[
  {
    "partition" : {
      "key" : [ "3" ],
      "position" : 0
    },
    "rows" : [
      {
        "type" : "row",
        "position" : 41,
        "clustering" : [ "3" ],
        "liveness_info" : { "tstamp" : "2019-01-25T02:51:13.574409Z" },
        "cells" : [
          { "name" : "c1", "value" : 3 },
          { "name" : "order_details", "deletion_info" : { "marked_deleted" : "2019-01-25T02:51:13.574408Z", "local_delete_time" : "2019-01-25T02:51:13Z" } },
          { "name" : "order_details", "path" : [ "key" ], "value" : "value" }
        ]
      }
    ]
  }

SSTable: /data/data/ks/nmtest-e1302500201d11e983bb693c02c04c62/mc-5-big
Partitioner: org.apache.cassandra.dht.Murmur3Partitioner
Bloom Filter FP chance: 0.010000
Minimum timestamp: 1548384673574408
Maximum timestamp: 1548384673574409
SSTable min local deletion time: 1548384673
SSTable max local deletion time: 2147483647
Compressor: org.apache.cassandra.io.compress.LZ4Compressor
Compression ratio: 1.0714285714285714
TTL min: 0
TTL max: 0
First token: -155496620801056360 (key=3)
Last token: -155496620801056360 (key=3)
minClustringValues: [3]
maxClustringValues: [3]
Estimated droppable tombstones: 0.5
SSTable Level: 0
Repaired at: 0
Replay positions covered: {CommitLogPosition(segmentId=1548382769966, position=6243201)=CommitLogPosition(segmentId=1548382769966, position=6433666)}
totalColumnsSet: 2
totalRows: 1
Estimated tombstone drop times:
1548384720:         1

另一个问题是在nodetool tablestats输出上-切片在cassandra中指的是什么?

    Average live cells per slice (last five minutes): 1.0
    Maximum live cells per slice (last five minutes): 1
    Average tombstones per slice (last five minutes): 1.0
    Maximum tombstones per slice (last five minutes): 1
    Dropped Mutations: 0
克里斯·洛芬克

sstablemetadata没有不包含在sstable中的有关您的表的信息,因为不能保证它在运行Cassandra的系统上运行,即使能够知道如何提取模式信息非常复杂从中。

由于gc_grace_seconds是表参数而不是元数据,因此默认情况下采用0gc宽限期,因此默认情况下,该直方图中列出的可放置时间将更多地是逻辑删除创建时间的直方图。如果您知道自己的gc宽限期,可以将其作为-g参数添加到sstablemetadata调用中。喜欢:

sstablemetadata -g 864000 mc-5-big-Data.db

有关工具输出的信息,请参见http://cassandra.apache.org/doc/latest/tools/sstable/sstablemetadata.html

对于集合而言,它只是其中包含的所有正常范围的墓碑。它们用于在覆盖多单元格集合的值时避免要求先写后读。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章