[英]Cassandra NodeTool cfstats count
我已經像這樣創建了一個cassandra表,其中包含許多信息:
CREATE TABLE keyspace.table1 (
uuid blob,
id bigint,
timestamp bigint,
description text,
option1 double,
PRIMARY KEY (uuid, id) ) WITH CLUSTERING ORDER BY (id ASC)
AND bloom_filter_fp_chance = 0.01
AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}'
AND comment = ''
AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99.0PERCENTILE';
我正在嘗試在其上運行nodetool cfstats以確定行數。 我在網上搜索,看來鍵的數量(估計)應該是行數。 但是,該數字非常低,如下所示,所以我知道這是不對的。 我究竟做錯了什么?
Table: table1
SSTable count: 3
Space used (live): 195.02 MB
Space used (total): 195.02 MB
Space used by snapshots (total): 567.99 KB
Off heap memory used (total): 61.83 KB
SSTable Compression Ratio: 0.3936987749701019
Number of keys (estimate): 19
Memtable cell count: 612048
Memtable data size: 14.18 MB
Memtable off heap memory used: 0 bytes
Memtable switch count: 6
Local read count: 2657130
Local read latency: 0.055 ms
Local write count: 2409743
Local write latency: 0.017 ms
Pending flushes: 0
Bloom filter false positives: 0
Bloom filter false ratio: 0.00000
Bloom filter space used: 64 bytes
Bloom filter off heap memory used: 40 bytes
Index summary off heap memory used: 84 bytes
Compression metadata off heap memory used: 61.71 KB
Compacted partition minimum bytes: 49.82 KB
Compacted partition maximum bytes: 85.8 MB
Compacted partition mean bytes: 27.06 MB
Average live cells per slice (last five minutes): 1.0160752060827343
Maximum live cells per slice (last five minutes): 5722
Average tombstones per slice (last five minutes): 1.0
Maximum tombstones per slice (last five minutes): 1
如果這不可能,是否還有另一種獲取表的行數的方法?
謝謝
在您的架構中,分區鍵是uuid列。 每個分區密鑰都是Cassandra存儲引擎的“行”。 因此,cfstats只是輸出為此表存儲的分區鍵的數量(當然是估計值)。
我將檢查並查看系統中有多少個不同的UUID,如果大約為19,那么一切都很好。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.