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 

C:\> %CASSANDRA_HOME%\bin\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 Remote JMX agent username.
keyspace Name of keyspace.
table Name of table.
key Partition key of the end points you want to get.
-- Separates an option from an argument that could be mistaken for a option.

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.
C:\> %CASSANDRA_HOME%\bin\nodetool -h 127.0.0.1 -p 7100 getendpoints myks mytable key_1
127.0.0.2
C:\> %CASSANDRA_HOME%\bin\nodetool -h 127.0.0.1 -p 7100 getendpoints myks mytable key_2
127.0.0.2
C:\> %CASSANDRA_HOME%\bin\nodetool -h 127.0.0.1 -p 7100 getendpoints myks mytable key_2
127.0.0.1
CASSANDRA_HOME
Windows 3.0 installations C:\Program Files\Datastax Community\apache-cassandra\
Windows 3.x installations C:\Program Files\Datastax-DDC\apache-cassandra\
On a standard Windows installation, the installation wizard creates %CASSANDRA_HOME% as an environment variable.