nodetool upgradesstables
Rewrites SSTables for tables that are not running the current version of DataStax Enterprise (DSE) to match current DSE version. Use this command when upgrading your server or changing compression options.
If the SSTables are already on the current version, the command returns immediately and no action is taken.
See sstableupgrade for SSTable compatibility with current DSE version.
|
If you have hard-linked snapshots or backups, running this tool increases the disk utilization up to the amount of space each table occupies on disk. Prior to running this tool, DataStax recommends that you check for available disk space and/or prune existing snapshots and backups to ensure there is enough space. However, it is prudent to retain at least one snapshot in case a restore is necessary. |
Synopsis
nodetool [<connection_options>] upgradesstables
[-a] [-j <num_jobs>] [--]
[<keyspace_name> <table_name> [<table_name> ...]]
Syntax legend
| Syntax conventions | Description |
|---|---|
Italic, bold, or |
Syntax diagrams and code samples use one or more of these styles to mark placeholders for variable values. Replace placeholders with a valid option or your own user-defined value. In CQL statements, angle brackets are required to enclose data types in a set, list, map, or tuple.
Separate the data types with a comma.
For example: In Search CQL statements, angle brackets are used to identify the entity and literal value to overwrite the XML element in the schema and |
|
Square brackets surround optional command arguments. Do not type the square brackets. |
|
Parentheses identify a group to choose from. Do not type the parentheses. |
|
A pipe separates alternative elements. Type any one of the elements. Do not type the pipe. |
|
Indicates that you can repeat the syntax element as often as required. |
|
Single quotation marks must surround literal strings in CQL statements.
Use single quotation marks to preserve upper case.
+
For Search CQL only: Single quotation marks surround an entire XML schema declaration, such as |
|
Map collection.
Curly braces enclose maps ( |
|
Ends a CQL statement. |
|
Separate command line options from command arguments with two hyphens. This syntax is useful when arguments might be mistaken for command line options. |
Options
If an option has a short and long form, both forms are given, separated by a comma.
- -h, --host hostname
-
The hostname or IP address of a remote node or nodes. When omitted, the default is the local machine.
- -p, --port jmx_port
-
The JMX port number.
- -pw, --password jmxpassword
-
The JMX password for authenticating with secure JMX. If a password is not provided, you are prompted to enter one.
- -pwf, --password-file jmx_password_filepath
-
The filepath to the file that stores JMX authentication credentials.
- -u, --username jmx_username
-
The username for authenticating with secure JMX.
- -a, --include-all-sstables
-
Upgrade target SSTables, including SSTables already on the current DSE version.
- -j, --jobs
-
Specify the number of SSTables affected simultaneously. Set to 0 to use all available compaction threads.
Default: 2
- keyspace_name
-
The keyspace name.
- table_name
-
One or more table names, separated by a space.
Examples
Upgrade all SSTables in all keyspaces and tables
nodetool upgradesstables
Upgrade all SSTables in the cycling keyspace
nodetool upgradesstables --include-all-sstables cycling
Upgrade all SSTables in the cycling keyspace and the cyclist_name table
nodetool upgradesstables --include-all-sstables cycling cyclist_name
Force upgrade all SSTables
Force upgrade the SSTables for the specified keyspace and table, including SSTables already on the current DSE version.
nodetool upgradesstables -a keyspace_name table_name
Upgrade four SSTables simultaneously until all SSTables are upgraded
nodetool upgradesstables --include-all-sstables --jobs 4
|
The number of |