DataStax Academy FAQ

DataStax Academy migrated to a new learning management system (LMS) in July 2020. We are also moving to a new Cassandra Certification process so there are changes to exam bookings, voucher system and issuing of certificates.

Check out the Academy FAQ pages for answers to your questions:


question

firinco avatar image
firinco asked ·

What tool or command can I run to check the token ranges owned by nodes?

Is there any tool or command to know which nodes holds which token/token ranges?

cassandratoken ranges
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

bettina.swynnerton avatar image
bettina.swynnerton answered ·

HI @firinco,

you can use the nodetool ring command on any node in your cluster.

In the Token column, you will see the end of the token range up to and including the value listed.

Here an example output from a 3-node cluster (these nodes have single tokens, no vnodes):

# nodetool ring

Datacenter: dc1
==========
Address     Rack        Status State   Load            Owns                Token                                       
                                                                           8753276737792369966                         
10.244.2.4  default     Up     Normal  154.89 KiB      89.45%              3494771406138284716                         
10.244.3.5  default     Up     Normal  181.32 KiB      82.05%              5441795363419772543                         
10.244.1.5  default     Up     Normal  212.28 KiB      28.51%              8753276737792369966

I hope this helps.

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Erick Ramirez avatar image
Erick Ramirez answered ·

As Bettina already pointed out, the nodetool ring command will list the tokens assigned to each node.

To add to that, there is also the nodetool describering command which lists the start and end tokens of the ranges for each keyspace on the nodes. Here is an example output on a single-node cluster I built just to keep it simple:

$ nodetool describering -- community
Schema Version:aa056aff-1d08-3072-be83-f3f1ee2a3219
Keyspace: community
TokenRange: 
TokenRange(start_token:3835820215023312942, end_token:3835820215023312942endpoints:[10.101.34.115]rpc_endpoints:[10.101.34.115]endpoint_details:[EndpointDetails(host:10.101.34.115, datacenter:Cassandra, rack:rack1)])

Cheers!

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.