Cassandra nodetool cfstats - Read Count is always 0

不羁岁月 提交于 2021-01-28 04:09:31

问题


I've got a problem with monitoring my Cassandra node. I ran

nodetool cfstats keyspaceName.tableName

Unfortunately Read Count is always 0 and Read Latency is NaN. I am doing reads and writes but only writes metrics are updated.

Here is what I got as an output:

Starting NodeTool
Keyspace: realtimetrader
    Read Count: 0
    Read Latency: NaN ms.
    Write Count: 402
    Write Latency: 0.09648756218905473 ms.
    Pending Flushes: 0
            Table: currencies
            SSTable count: 1
            Space used (live): 5254
            Space used (total): 5254
            Space used by snapshots (total): 0
            Off heap memory used (total): 40
            SSTable Compression Ratio: 0.0
            Number of keys (estimate): 14
            Memtable cell count: 1608
            Memtable data size: 567
            Memtable off heap memory used: 0
            Memtable switch count: 0
            Local read count: 0
            Local read latency: NaN ms
            Local write count: 402
            Local write latency: 0.106 ms
            Pending flushes: 0
            Bloom filter false positives: 0
            Bloom filter false ratio: 0,00000
            Bloom filter space used: 24
            Bloom filter off heap memory used: 16
            Index summary off heap memory used: 16
            Compression metadata off heap memory used: 8
            Compacted partition minimum bytes: 125
            Compacted partition maximum bytes: 149
            Compacted partition mean bytes: 149
            Average live cells per slice (last five minutes): 0.0
            Maximum live cells per slice (last five minutes): 0
            Average tombstones per slice (last five minutes): 0.0
            Maximum tombstones per slice (last five minutes): 0

----------------

I appreciate any help.


回答1:


Since each node is responsible for a different set of data, its possible that all the data you have been reading is belongs to other nodes. Many drivers have a token aware load balancing policy that will send the read to a node that should own it. With a CL.ONE default consistency this also means it will short cut sending the read to other nodes (except in the case of hitting the read repair chance).

Depending on version you are using and what query you make you may not see this increment as well: https://issues.apache.org/jira/browse/CASSANDRA-7338



来源:https://stackoverflow.com/questions/34577401/cassandra-nodetool-cfstats-read-count-is-always-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!