Apache Cassandra™ 2.0

The sstablescrub utility

An offline version of nodetool scrub. This tool attempts to remove the corrupted parts while preserving non-corrupted data.

The sstablescrub utility is an offline version of nodetool scrub. It attempts to remove the corrupted parts while preserving non-corrupted data.

If scrubbing results in dropping rows, new SSTables become unrepaired. However, if no bad rows are detected, the SSTable keeps its origin repairedAt field, which denotes the time of repair. If the entire table is unreadable, it will not be able to repair it.

Procedure

  1. Before using sstablescrub, try rebuilding the tables using nodetool scrub.

    If nodetool scrub does not fix the problem, use this utility. Because it runs offline, sstablescrub can correct errors that nodetool scrub cannot.

  2. Shut down the node.
  3. Run the utility:
    • Packaged installs: sstablescrub [options] <keyspace> <table>
    • Tarball installs: install_location/bin/sstablescrub [options] <keyspace> <table>
    Options
    Flag Option Description
    --debug Display stack traces.
    -h --help Display help.
    -m --manifest-check Only check and repair the leveled manifest, without actually scrubbing the SSTables.
    -v --verbose Verbose output.
  4. After running this utility, you must perform a repair because corrupted rows are thrown away.
Show/hide