A technical troubleshooting blog about Oracle with other Databases & Cloud Technologies.

Cassandra Commands

1 min read
green and yellow printed textile

Photo by Markus Spiske on Pexels.com

cassandra -f 	
[start commads]

./nodetool status	
[checking status]

./nodetool ring	
[depicts of the state of nodes]

./nodetool -h clean	
[cleanup of keys that no longer belong to a particular node]

./nodetool -h info	
[gives information token,disk storage, generation number,uptime seconds,heap]

./nodetool -h compact	
[immediate compaction on the entire node,key space,column family level]

./nodetool flush keyspace_name table_name	
[flush memtables to sstables]

Decommissioning & Removing nodes.

./nodetool -h decommission 
[leave the node from the cluster] -- execute in decommission node

./nodetool removenode host_id	[removing a node permanently] -- encrypted id

Node Repair

./nodetool -h localhost repair		
[fix the data on any node]

./nodetool -h repair full	

Replacing Node

./cassandra -Dcassandra.replace_address= 
[replacing node] -- From new node command line

./nodetool cfstats keyspace.table_name 
[column family statistics]

Cluster Statistics Tools

./nodetool -h netstats	
[view the network statistics]

./nodetool -h	tpstats	
[view the thread pool statistics]

./nodetool -h compactionstats	
[indicates the compaction process running at an instant]

./nodetool drain	
[forces the  node to stop listening to other nodes and clients]

./nodetool -h upgradesstables	
[rebuilds sstables]


./nodetool -h snapshot keyspace_name -cf table_name -t snapshot_name 

./nodetool -h clearsnapshot keyspace_name -t snashot_name

./nodetool listsnapshots