nodetool sequence
Where is the cassandra-env.sh
file?
The location of the cassandra-env.sh
file depends on the type of installation:
Installation Type | Location |
---|---|
Package installations + Installer-Services installations |
|
Tarball installations + Installer-No Services installations |
|
Run multiple nodetool
commands from a file, resource, or standard input (StdIn) sequentially.
Synopsis
nodetool [options] sequence
[--failonerror] [(-i <input> | --input <input>)...] [--stoponerror] [--] [<commands>...]
Tarball and Installer No-Services path:
<installation_location>/resources/cassandra/bin
Common options
These options apply to all nodetool
commands.
Short | Long | Description |
---|---|---|
|
|
Hostname or IP address. |
|
|
Remote JMX agent port number. |
|
|
Password. |
|
|
Password file path. |
|
|
Remote JMX agent user name. |
|
Separates an option from an argument that could be mistaken for an option. |
|
Sequence options
The following options are specific to the sequence command:
Short | Long | Description |
---|---|---|
|
By default, the sequence command does not fail (return an error exit code) if one or more child commands fail. Set this option to true to return an error exit code if a child command fails. |
|
|
|
The file or classpath resource to read nodetool commands from, one command per line.
Use |
|
By default, if one child command fails, the sequence command continues with remaining commands. Set this option to true to stop on error. |
|
|
Commands to execute.
Separate individual commands using a colon surrounded by whitespaces ( |
Description
Run multiple nodetool
commands from a file, resource, or standard input (StdIn) sequentially.
Common options (host, port, username, password) are passed to child commands.
This command reduces overhead and is faster than running nodetool
commands individually from a shell script because the JVM doesn’t have to restart for each command.
Example
For example, create a text file with one command per line, and specify the file name and location file in the command. Each command in the file runs sequentially.
nodetool sequence -i path_to_text_file
#nodetool sequence sample file
info
gettimeout read
gettimeout write
status