sstablekeys

The sstablekeys utility dumps table keys.

The sstablekeys utility dumps table keys.

Usage:
C:\> cd "Program Files\DataStax Community\apache-cassandra\tools\bin"
C:\> sstablekeys sstable_name

Procedure

  1. If data has not been previously flushed to disk, manually flush it. For example:
    C:\> %CASSANDRA_HOME%\nodetool flush cycling cyclist_name
  2. To list the keys in an SSTable, find the name of the SSTable file.
    The file is located in the data directory and has a .db extension.
    • Package installations: /var/lib/cassandra/data
    • Tarball installations: install_location/data/data
    • Windows installations: C:\Program Files\DataStax Community\data\data
  3. Look at keys in the SSTable data. For example, use sstablekeys followed by the path to the data. Use the path to data for your Cassandra installation:
    C:\> sstablekeys "Program Files\DataStax Community\data\data\cycling\cyclist_name-a882dca02aaf11e58c7b8b496c707234\la-1-big-Data.db"

    The output appears, for example: