我创建了一个包含集合的表。插入一条记录并将它的sstabledump取下,看到sstable中有它的范围墓碑。这个墓碑曾经被移走过吗?另外,当我在唯一的sstable上运行sstablemetadata时,它将“estimated dropable tombstones”显示为0.5,同样地,它将epoch time显示为插入时间的一条记录-“estimated tombstone drop times: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输出上——slice在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
1条答案
按热度按时间brtdzjyr1#
sstablemetadata不包含不在sstable中的有关表的信息,因为它不能保证在运行cassandra的系统上运行,即使知道如何从中提取架构信息非常复杂。
自从
gc_grace_seconds
是一个表参数,不在它默认为0
gc grace,所以在该直方图中列出的可拖放时间在默认情况下将更多地是tombstone创建时间的直方图。如果你知道你的gc恩典,你可以把它作为-g
sstablemetadata调用的参数。比如:看到了吗http://cassandra.apache.org/doc/latest/tools/sstable/sstablemetadata.html 有关工具输出的信息。
对于收藏品来说,这只是一个普通的墓碑。它们用于在重写多单元集合的值时防止先读后写的要求。