【问题标题】:Understanding "Number of keys" in nodetool cfstats了解 nodetool cfstats 中的“键数”
【发布时间】:2015-03-13 21:02:38
【问题描述】:

我是 Cassandra 的新手,在此示例中,我使用的是具有 1 个 DC 和 5 个节点的集群以及复制因子为 3 的 NetworkTopologyStrategy。

   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 个不同的节点,在每个节点上分别触发以下命令后,我得到同一张表的不同统计信息。

nodetool cfstats -h 192.168.1.12 activityfeed.feed_shubham

根据上面的输出,我可以解释 cfstats 为我提供了有关每个节点上数据物理存储的统计信息。

我浏览了下面的文档 http://www.datastax.com/documentation/cassandra/2.0/cassandra/tools/toolsCFstats.html 但是我没有找到那里的钥匙数量的解释。

我正在使用 RandomPartitioner。

这个键与分区键有什么关系吗?

我的表中有大约 200000 条记录。

【问题讨论】:

    标签: database-performance cql cassandra-2.0 nodetool


    【解决方案1】:

    键数表示该节点上表的分区键数。这只是一个估计,基于您的 C* its more accurate 版本。在 2.1.6 之前,它对每个 sstable 的索引文件中列出的分区数求和。然后它合并每个 sstable 存储的数据草图(hyperloglog)。

    【讨论】:

      【解决方案2】:

      这个值似乎表示所有本地 sstables 中的列/单元格的总数。我想它应该被命名为“SSTable cell count”,就像相应的memtable值一样。但是,由于 sstable 在压缩之前存储了冗余数据,因此该值不一定与作为结果集的一部分返回的实际列数相对应。

      【讨论】:

      • 这是分区,不是单元格
      猜你喜欢
      • 2016-10-07
      • 2014-01-16
      • 2016-03-25
      • 2016-10-26
      • 2016-04-07
      • 1970-01-01
      • 2015-01-26
      • 2016-01-15
      • 2015-06-15
      相关资源
      最近更新 更多