nodetool sequence
Run multiple nodetool commands from a file, resource, or standard input (StdIn) sequentially.
cassandra-env.sh
- The cassandra-env.sh file is located in the installation_location/conf directory.
Run multiple nodetool commands from a file, resource, or standard input (StdIn) sequentially.
Synopsis
install_location/bin/nodetool [options] sequence
[--failonerror] [(-i <input> | --input <input>)...] [--stoponerror] [--] [<commands>...]
Common options
These options apply to all nodetool commands.
Short | Long | Description |
---|---|---|
-h |
--host |
Hostname or IP address. |
-p |
--port |
Remote JMX agent port number. |
-pw |
--password |
Password. |
-pwf |
--password-file |
Password file path. |
-u |
--username |
Remote JMX agent user name. |
-- |
Separates an option from an argument that could be mistaken for a option. |
- 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.
Sequence options
The following options are specific to the sequence command:
Short | Long | Description | |
---|---|---|---|
--failonerror |
By default, the sequence command will 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. | ||
-iinput |
--inputinput |
The file or classpath resource to read nodetool commands from, one command per
line. Use /dev/stdin to read from standard input. Multiple input
can be entered. |
|
--stoponerror |
By default, if one child command fails, the sequence command continues with remaining commands. Set this option to true to stop on error. | ||
commands |
Commands to execute. Separate individual commands using a colon surrounded by
whitespaces (' : ' ). For example: nodetool sequence info :
gettimeout read : gettimeout write : status |
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
nodetool sequence -i path_to_text_file
#nodetool sequence sample file
info
gettimeout read
gettimeout write
status