Skip to content

AxonOps — AI-Native Control Plane for Open Source Data Platforms

nodetool getsstables

Lists SSTables containing a partition key.


Terminal window
nodetool [connection_options] getsstables [--hex-format] <keyspace> <table> <key>

See connection options for connection options.

nodetool getsstables identifies which SSTable files contain data for a specific partition key. This is useful for debugging, investigating data distribution, or understanding where specific data resides on disk.


ArgumentDescription
keyspaceTarget keyspace name
tableTarget table name
keyPartition key value
OptionDescription
-hf, --hex-formatInterpret key as hex-encoded bytes
-l, --show-levelsInclude SSTable level information (for LCS)

Terminal window
nodetool getsstables my_keyspace my_table user123
Terminal window
nodetool getsstables --hex-format my_keyspace my_table 0x1234567890abcdef
/var/lib/cassandra/data/my_keyspace/my_table-12345678901234567890/mc-1-big-Data.db
/var/lib/cassandra/data/my_keyspace/my_table-12345678901234567890/mc-5-big-Data.db

Terminal window
# Find which SSTables contain specific partition
nodetool getsstables my_keyspace users user_12345
Terminal window
# Check if hot key spans multiple SSTables
nodetool getsstables my_keyspace events hot_partition_key | wc -l
Terminal window
# Before and after compaction, check key distribution
nodetool getsstables my_keyspace my_table test_key

Usage Guidelines

  1. Know key format - Ensure correct key encoding
  2. Multiple SSTables normal - Data may span multiple files
  3. Post-compaction - Fewer SSTables after compaction

CommandRelationship
tablestatsTable SSTable counts
compactForce compaction
getendpointsFind replicas for key