sstablerepairedset
Sets status as repaired or unrepaired on a given set of SSTables and updates the repairedAt field to denote the time of the repair while offline.
This metadata facilitates incremental repairs.
Use this tool in the process of migrating an installation to incremental repair.
|
Stop HCD before you run this command. |
|
Use sstableutil to list the *.db files in a keyspace. |
The default location of this SSTable tool depends on your installation type:
-
Package installations:
/usr/bin/ -
Tarball installations:
INSTALL_DIRECTORY/resources/cassandra/tools/bin
Synopsis
sstablerepairedset
--really-set [--is-repaired | --is-unrepaired]
[-f <sstable_list_file> | <sstable_filepath>]
Definition
The short- and long-form options are comma-separated.
- -f sstable_list_file
-
The file path to a file that contains a list of SSTables. For example, a
*.txtfile. - --is-repaired
-
Sets repaired status.
- --is-unrepaired
-
Sets unrepaired status.
- --really-set
-
Acknowledgement of potential command impact with HCD stopped.
- sstable_filepath
-
The explicit or relative file path to the SSTable data file ending in
Data.db.
Examples
|
Stop HCD before you run this command. |
-
Verify HCD is not running:
nodetool statusDatacenter: Test ================================ Status=Up/Down |/ State=Normal/Leaving/Joining/Moving -- Address Load Tokens Owns Host ID Rack UN 10.200.177.92 265.04 KiB 1 ? 980cab6a-2e5d-44c6-b897-0733dde580ac rack1 DN 10.200.177.94 426.21 KiB 1 ? 7ecbbc0c-627d-403e-b8cc-a2daa93d9ad3 rack1 -
Mark SSTable as repaired:
sstablerepairedset --really-set --is-repaired /var/lib/cassandra/data/cycling/cyclist_category-e1f76e21ce4311e8949e33016bf887c0/aa-1-bti-Data.dbThere is no command output.
-
Mark SSTables as unrepaired with a file containing a list of SSTables:
sstablerepairedset --is-unrepaired -f repairSetSSTables.txtThe
repairSetSSTables.txtfile contains a list of SSTables (*Data.db) files, like:/data/cycling/cyclist_by_country-82246fc065ff11e5a4c58b496c707234/ma-1-big-Data.db /data/cycling/cyclist_by_birthday-8248246065ff11e5a4c58b496c707234/ma-1-big-Data.db /data/cycling/cyclist_by_birthday-8248246065ff11e5a4c58b496c707234/ma-2-big-Data.db /data/cycling/cyclist_by_age-8201305065ff11e5a4c58b496c707234/ma-1-big-Data.db /data/cycling/cyclist_by_age-8201305065ff11e5a4c58b496c707234/ma-2-big-Data.db