I'd like to query Cassandra for the information retrieved with a nodetool status
command in a Java application. Is this possible or do I have to run nodetool and parse the output?
Asked
Active
Viewed 198 times
2 Answers
0
Not possible in current versions to get that information over cql. There will be a ring state in system_views keyspace in future but in current versions its impossible. You have to either use JMX like nodetool or run nodetool and parse the output.

Chris Lohfink
- 16,150
- 1
- 29
- 38
0
Some of information is exposed via cluster metadata - you can get Metadata
object via Cluster.getMetadata
, then get all hosts via getAllHosts
and extract data, like, is node up or not, what token ranges it owns, etc.

Alex Ott
- 80,552
- 8
- 87
- 132