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%\bin\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.
    • Windows 3.0 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 %CASSANDRA_HOME%\data\data\cycling\cyclist_name-a882dca02aaf11e58c7b8b496c707234\la-1-big-Data.db

    The output appears, for example:

    CASSANDRA_HOME
    Windows 3.0 installations C:\Program Files\Datastax Community\apache-cassandra\
    Windows 3.x installations C:\Program Files\Datastax-DDC\apache-cassandra\
    On a standard Windows installation, the installation wizard creates %CASSANDRA_HOME% as an environment variable.