nodetool getendpoints

Provides the IP addresses or names of replicas that own the partition key.

Provides the IP addresses or names of replicas that own the partition key.

Synopsis 

nodetool <options> getendpoints -- <keyspace> <table> key
Options
Short Long Description
-h --host Hostname or IP address
-p --port Port number
-pwf --password-file Password file path
-pw --password Password
-u --username User name
-- Separates an option from an argument that could be mistaken for a option.
Other options are:
  • keyspace is a keyspace name.
  • table is a table name.
  • key is the partition key of the end points you want to get.

Example 

For example, which nodes own partition key_1, key_2, and key_3?
Note: The partitioner returns a token for the key. Cassandra will return an endpoint whether or not data exists on the identified node for that token.
bin/nodetool -h 127.0.0.1 -p 7100 getendpoints myks mytable key_1
127.0.0.2
bin/nodetool -h 127.0.0.1 -p 7100 getendpoints myks mytable key_2
127.0.0.2
bin/nodetool -h 127.0.0.1 -p 7100 getendpoints myks mytable key_3
127.0.0.1