nodetool scrub 

Rebuilds SSTables for one or more tables.

Creates a snapshot and then rebuilds SSTables on a node. If possible use nodetool upgradesstables instead of scrub.

Scrub automatically discards broken data and removes any tombstoned rows that have exceeded gc_grace period of the table. If partition key values do not match the column data type, the partition is considered corrupt and the process automatically stops.

Attention: When using LCS, resets all SSTables back to Level 0 and requires recompaction of all SSTables.

Synopsis 

nodetool main_options scrub [(-j <jobs> | --jobs <jobs>)] \
[(-n | --no-validate)][(-ns | --no-snapshot)] \
[(-s | --skip-corrupted)] \
[--] [<keyspace> <tables>...]
DataStax Enterprise 5.0 Installer No-Services and tarball installations:
installation_location/resources/cassandra/bin

Main options 

The following options apply to all nodetool commands:
Main options
Short Long Description
-h --host Hostname or IP address.
-p --port Port number.
-pwf --password-file Password file path.
-pw --password Password.
-u --username Username.
--   Separates command parameters from a list of options.
Note:
  • If a username and password for RMI authentication are set explicitly in the cassandra-env.sh file for the host, then you must specify credentials.
    The location of the cassandra-env.sh file depends on the type of installation:
    DataStax Enterprise 5.0 Installer-Services and package installations /etc/dse/cassandra/cassandra-env.sh
    DataStax Enterprise 5.0 Installer-No Services and tarball installations install_location/resources/cassandra/conf/cassandra-env.sh
    Cassandra package installations /etc/cassandra/cassandra-env.sh
    Cassandra tarball installations install_location/conf/cassandra-env.sh
  • The repair and rebuild commands can affect multiple nodes in the cluster.
  • Most nodetool commands operate on a single node in the cluster if -h is not used to identify one or more other nodes. If the node from which you issue the command is the intended target, you do not need the -h option to identify the target; otherwise, for remote invocation, identify the target node, or nodes, using -h.
Example:
nodetool -u username -pw password describering demo_keyspace

Scrub parameters 

Use the following parameters with the scrub command:

-j jobs 
(Long --jobs jobs) Number of SSTables to simultaneously scrub. Zero (0) uses all available compaction threads.

Default: 2.

-n 
(Long --no-validate). Suppresses validation of columns.

Default: Validate all columns.

-ns 
(Long --no-snapshot). Suppresses creation of snapshot.

Default: Create a snapshot before rebuilding SSTables.

-s 
(Long --skip-corrupted.) Forces scrub to skip corrupt partitions and continue. Corrupt partitions have a column value that does not match the column data type. Logs skipped partitions in the system.log.

Default: Stop scrubbing if a corrupted partition is detected.

Note: Skipping corrupted partitions on tables with counter columns results in under-counting.
keyspace_name table_name […]
Identifies the keyspace and targets specific tables using a space separated list.

Default: Include all keyspaces and tables on the node when no arguments are specified.