0

I'm having a Cassandra 1.2.13 cluster with 4 nodes and RF 3. And reads/writes in QUORUM.

I have assigned initial tokens using the following which is given here.

python -c 'print [str(((2**64 / 4) * i) - 2**63) for i in range(4)]' 

But when I insert data to Cassandra, one node's load (58.07 KB) does not change, while others' go up. Here is the nodetool ring output.

Datacenter: datacenter1
==========
Replicas: 3

Address      Rack        Status State   Load            Owns                Token
                                                                            4611686018427387904
204.13.85.2  rack1       Up     Normal  58.07 KB        75.00%              -9223372036854775808
204.13.85.3  rack1       Up     Normal  9.32 MB         75.00%              -4611686018427387904
204.13.85.4  rack1       Up     Normal  16.27 MB        75.00%              0
204.13.85.5  rack1       Up     Normal  16.75 MB        75.00%              4611686018427387904

This means that particular node is not getting any data, isn't it?

Why does that happen?

Thanks, Bhathiya

3
  • Did you specify <keyspace> to which you're writing for that command? Mar 11, 2014 at 18:43
  • Did you run just nodetool ring or nodetool ring <keyspace_name>? Mar 11, 2014 at 20:56
  • just nodetool ring.
    – Bee
    Mar 12, 2014 at 2:27

1 Answer 1

1

The most likely cause of this is not that the node is not getting any data, but that the node has not yet flushed to disk. The write path of Cassandra goes first to a memtable and on-disk commitlog. As long as that memtable is not flushed you won't see the amount of disk space used go up. Try running

nodetool flush

on 204.13.85.2 to force the memtable to disk and see if the number goes up. This would be naturally triggered if you inserted more data.

2
  • Thanks. I will try that. But I have another question. Since I have set initial tokens in a completely balanced way, shouldn't I see all the nodes having a similar load?
    – Bee
    Mar 11, 2014 at 17:29
  • 2
    The load is telling you how much hard drive space is in use. Until the memtable is flushed this will be different between nodes since some have the data in memory and some have it on disk. Once you get up in the gigabytes of data this will look like you would expect, you're currently just in a regime where the amount of data in memory is ~= the total amount of data on the node.
    – RussS
    Mar 11, 2014 at 18:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.