3

This is maybe a special question but is it possible to determine the node(s) of a partion key?

example: I have a partition key id (int) and I'm using the default Partitioner(Murmur3Partitioner) with 3 nodes and replication factor "1". Can I determine the one node with id = 3?

CREATE TABLE example_table (
    id int,    
    content text,
    PRIMARY KEY (id, content)
) 
itstata
  • 1,058
  • 7
  • 17

1 Answers1

6

You can use nodetool getendpoints <keyspace> <table> <partition_key>

or you can use select token(<partition_key>) from <table_name> and then run nodetool ring.

Check also this for further info

Horia
  • 2,942
  • 7
  • 14