nodetool getsstables

Provides the SSTables that own the partition key.

Synopsis

nodetool <options> getsstables [(-hf | --hex-format)]
-- <keyspace> <table> <key>

Tarball and Installer No-Services path:

<installation_location>/resources/cassandra/bin
Connection options
Short Long Description

-h

--host

Hostname or IP address.

-p

--port

Port number.

-pwf

--password-file

Password file path.

-pw

--password

Password.

-u

--username

Remote JMX agent username.

keyspace

Name of keyspace.

table

One or more table names, separated by a space.

key

Partition key of the SSTables.

--

Separates an option from an argument that could be mistaken for an option.

Description

This command can be used to retrieve an SSTable.

Examples

The following example of this command retrieves the SSTable for cycling.cyclist_name with the key argument fb372533-eb95-4bb4-8685-6ef61e994caa, which is the id for one of the cyclists listed in the cyclist_name table:

nodetool getsstables cycling cyclist_name 'fb372533-eb95-4bb4-8685-6ef61e994caa'

The output is:

/var/lib/cassandra/data/cycling/cyclist_name-612a64002ec211e6a92457e568fce26f/ma-1-big-Data.db

Sometimes it’s useful to retrieve an SSTable from the hex string representation of its key, for instance, when you get this exception and you want to find out which SSTable owns the faulty key:

java.lang.AssertionError: row DecoratedKey(2769066505137675224, 00040000002e00000800000153441a3ef000) received out of order wrt DecoratedKey(2774747040849866654, 00040000019b0000080000015348847eb200)

The nodetool getsstables command will only work if the primary key of the given table is a blob.

nodetool getsstables keyspace table_name 00040000002e00000800000153441a3ef000

Use the --hex-key option to retrieve the DecoratedKey from the hexstr representation of the key:

nodetool getsstables ks cf --hex-key 00040000002e00000800000153441a3ef000
nodetool getsstables keyspace1 standard1 3330394c344e35313730

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