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

/etc/dse/cassandra/cassandra-env.sh

Tarball installations + Installer-No Services installations

<installation_location>/resources/cassandra/conf/cassandra-env.sh

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.

Common options
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 an option.

  • For tarball installations, execute the command from the <installation_location>/bin directory.

  • 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:

Sequence options
Short Long Description

--failonerror

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.

-i input

--input input

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

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

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com