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
Cassandra tarball installations:
installation_location/cassandra/bin
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.
nodetool -h 127.0.0.1 -p 7100 getendpoints myks mytable key_1
127.0.0.2
nodetool -h 127.0.0.1 -p 7100 getendpoints myks mytable key_2
127.0.0.2
nodetool -h 127.0.0.1 -p 7100 getendpoints myks mytable key_2
127.0.0.1