了解“键数";在nodetool cfstats中 [英] Understanding "Number of keys" in nodetool cfstats
问题描述
我是Cassandra的新手,在此示例中,我正在使用具有1个DC和5个节点的集群以及一个复制因子为3的NetworkTopologyStrategy.
I am new to Cassandra, in this example i am using a cluster with 1 DC and 5 nodes and a NetworkTopologyStrategy with replication factor as 3.
Keyspace: activityfeed
Read Count: 0
Read Latency: NaN ms.
Write Count: 0
Write Latency: NaN ms.
Pending Tasks: 0
Table: feed_shubham
SSTable count: 1
Space used (live), bytes: 52620684
Space used (total), bytes: 52620684
SSTable Compression Ratio: 0.3727660543119897
Number of keys (estimate): 137984
Memtable cell count: 0
Memtable data size, bytes: 0
Memtable switch count: 0
Local read count: 0
Local read latency: 0.000 ms
Local write count: 0
Local write latency: 0.000 ms
Pending tasks: 0
Bloom filter false positives: 0
Bloom filter false ratio: 0.00000
Bloom filter space used, bytes: 174416
Compacted partition minimum bytes: 771
Compacted partition maximum bytes: 924
Compacted partition mean bytes: 924
Average live cells per slice (last five minutes): 0.0
Average tombstones per slice (last five minutes): 0.0
这里的键数是什么意思? 我的集群中有5个不同的节点,并且在每个节点上分别触发以下命令后,我得到了同一张表的不同统计信息.
What does Number of keys here mean? I have 5 different nodes in my cluster, and after firing the below command on each node separately i get different statistic for the same table.
nodetool cfstats -h 192.168.1.12 activityfeed.feed_shubham
根据上面的输出,我可以解释为cfstats为我提供了有关每个节点上数据的物理存储的统计信息.
As per the output above i can interpret that cfstats gives me stats regarding the physical storage of data on each node.
我仔细阅读了以下文档 http://www.datastax.com/documentation/cassandra/2.0/cassandra/tools/toolsCFstats.html 但是我没有找到其中的按键数量的解释.
And i went through the below doc http://www.datastax.com/documentation/cassandra/2.0/cassandra/tools/toolsCFstats.html But i did not find the explanation for number of keys in there.
我正在使用RandomPartitioner.
I am using a RandomPartitioner.
此键与分区键有关系吗?
Is this key anything to do with the Partition key?
我的表中有大约200000条记录.
I have around 200000 record in my table.
推荐答案
键数表示该节点在表上的分区键数.不过,这只是一个估算,并基于您的C *版本它更准确 .在2.1.6之前,它汇总了每个sstable的索引文件中列出的分区数.然后,它合并每个稳定表存储的数据草图(超级日志).
The number of keys represents the number of partition keys on that node for the table. Its just an estimate though, and based on your version of C* its more accurate. Before 2.1.6 it summed the number of partitions listed in index file per sstable. Afterwards it merges a sketch of the data (hyperloglog) thats stored per sstable.
这篇关于了解“键数";在nodetool cfstats中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!