sstablemetadata

Prints metadata about given SSTable or SSTables to standard output, including SSTable name, partitioner, tombstone details, compressor, TTL, token, min and max clustering values, SSTable level, partition size and statistics, and column information.

The default location of this SSTable tool depends on the type of installation:

  • Package installations: /usr/bin/

  • Tarball installations: <installation_location>/resources/cassandra/tools/bin

Synopsis

sstablemetadata
[-c] [-g <seconds>] [-s] [-t <time_unit>] [-u]
<sstable_filepath> [<sstable_filepath> ...]
Syntax conventions Description

UPPERCASE

Literal keyword.

Lowercase

Not literal.

<`Italics>`

Variable value. Replace with a valid option or user-defined value.

[ ]

Optional. Square brackets ( [ ] ) surround optional command arguments. Do not type the square brackets.

( )

Group. Parentheses ( ( ) ) identify a group to choose from. Do not type the parentheses.

|

Or. A vertical bar ( | ) separates alternative elements. Type any one of the elements. Do not type the vertical bar.

...

Repeatable. An ellipsis ( ... ) indicates that you can repeat the syntax element as often as required.

'<Literal string>'

Single quotation ( ' ) marks must surround literal strings in CQL statements. Use single quotation marks to preserve upper case.

{ <key>:<value> }

Map collection. Braces ( { } ) enclose map collections or key value pairs. A colon separates the key and the value.

<<datatype1>,<datatype2>>

Set, list, map, or tuple. Angle brackets ( < > ) enclose data types in a set, list, map, or tuple. Separate the data types with a comma.

cql_statement;

End CQL statement. A semicolon ( ; ) terminates all CQL statements.

[ -- ]

Separate the command line options from the command arguments with two hyphens ( -- ). This syntax is useful when arguments might be mistaken for command line options.

' <<schema> ... </schema> >'

Search CQL only: Single quotation marks ( ' ) surround an entire XML schema declaration.

@<xml_entity>='<xml_entity_type>'

Search CQL only: Identify the entity and literal value to overwrite the XML element in the schema and solrconfig files.

The short form and long form parameters are comma-separated.

Command arguments

-c, --colors

ANSI color sequence.

-g, --gc_grace_seconds seconds

Time to use when calculating droppable tombstones.

sstable_filepath

The explicit or relative filepath to the SSTable data file ending in Data.db.

-s, --scan

Full SSTable scan for additional details. Default: false.

-t, --timestamp_unit time_unit

Time unit that cell timestamps are written with.

-u, --unicode

Use Unicode to draw histograms and progress bars.

Examples

These examples are generated using the cycling keyspace. See Setting up the Cycling keyspace.

Get information about SSTable

sstablemetadata /var/lib/cassandra/data/cycling/birthday_list-f4f24621ce3f11e89d32bdcab3a99c6f/aa-1-bti-Statistics.db
SSTable: /var/lib/cassandra/data/cycling/birthday_list-f4f24621ce3f11e89d32bdcab3a99c6f/aa-1-bti
Partitioner: org.apache.cassandra.dht.Murmur3Partitioner
Bloom Filter FP chance: 0.01
Minimum timestamp: 1539363480354442 (10/12/2018 16:58:00)
Maximum timestamp: 1539363480374846 (10/12/2018 16:58:00)
SSTable min local deletion time: 1539363480 (10/12/2018 16:58:00)
SSTable max local deletion time: 2147483647 (no tombstones)
Compressor: org.apache.cassandra.io.compress.LZ4Compressor
Compression ratio: 0.6884057971014492
TTL min: 0
TTL max: 0
First token: -5189327806405140569 (Claudio HEINEN)
Last token: -428849430723689847 (Luc HAGENAARS)
minClusteringValues: []
maxClusteringValues: []
Estimated droppable tombstones: 0.3333333333333333
SSTable Level: 0
Repaired at: 0
Pending repair: --
Replay positions covered: {CommitLogPosition(segmentId=1539277782404, position=18441844)=CommitLogPosition(segmentId=1539277782404, position=18480562)}
totalColumnsSet: 3
totalRows: 3
Estimated tombstone drop times:
  Drop Time                        | Count  (%)  Histogram
  1539363480 (10/12/2018 16:58:00) |     3 (100) OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
  Percentiles
  50th      1663415872 (09/17/2022 11:57:52)
  75th      1663415872 (09/17/2022 11:57:52)
  95th      1663415872 (09/17/2022 11:57:52)
  98th      1663415872 (09/17/2022 11:57:52)
  99th      1663415872 (09/17/2022 11:57:52)
  Min       1386179894 (12/04/2013 17:58:14)
  Max       1663415872 (09/17/2022 11:57:52)
Partition Size:
  Size (bytes) | Count  (%)  Histogram
  103 (103 B)  |     3 (100) OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
  Percentiles
  50th      103 (103 B)
  75th      103 (103 B)
  95th      103 (103 B)
  98th      103 (103 B)
  99th      103 (103 B)
  Min       87 (87 B)
  Max       103 (103 B)
Column Count:
  Columns | Count  (%)  Histogram
  3       |     3 (100) OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
  Percentiles
  50th      3
  75th      3
  95th      3
  98th      3
  99th      3
  Min       3
  Max       3
Estimated cardinality: 3
EncodingStats minTTL: 0
EncodingStats minLocalDeletionTime: 1539363480 (10/12/2018 16:58:00)
EncodingStats minTimestamp: 1539363480354442 (10/12/2018 16:58:00)
KeyType: org.apache.cassandra.db.marshal.UTF8Type
ClusteringTypes: []
StaticColumns:
RegularColumns: blist_:org.apache.cassandra.db.marshal.MapType(org.apache.cassandra.db.marshal.UTF8Type,org.apache.cassandra.db.marshal.UTF8Type)

Get information about SSTable with username

sstablemetadata /var/lib/cassandra/data/cycling/cyclist_category-e1f76e21ce4311e8949e33016bf887c0/aa-1-bti-Rows.db -u
SSTable: /var/lib/cassandra/data/cycling/cyclist_category-e1f76e21ce4311e8949e33016bf887c0/aa-1-bti
Partitioner: org.apache.cassandra.dht.Murmur3Partitioner
Bloom Filter FP chance: 0.01
Minimum timestamp: 1539365167498813 (10/12/2018 17:26:07)
Maximum timestamp: 1539365167524231 (10/12/2018 17:26:07)
SSTable min local deletion time: 2147483647 (no tombstones)
SSTable max local deletion time: 2147483647 (no tombstones)
Compressor: org.apache.cassandra.io.compress.LZ4Compressor
Compression ratio: 1.0761904761904761
TTL min: 0
TTL max: 0
First token: -798238132730727330 (One-day-races)
Last token: -798238132730727330 (One-day-races)
minClusteringValues: [367]
maxClusteringValues: [198]
Estimated droppable tombstones: 0.0
SSTable Level: 0
Repaired at: 0
Pending repair: --
Replay positions covered: {CommitLogPosition(segmentId=1539277782404, position=19530606)=CommitLogPosition(segmentId=1539277782404, position=19541152)}
totalColumnsSet: 4
totalRows: 2
Estimated tombstone drop times:
  Drop Time | Count  (%)  Histogram
  Percentiles
  50th      0
  75th      0
  95th      0
  98th      0
  99th      0
  Min       0
  Max       0
Partition Size:
  Size (bytes) | Count  (%)  Histogram
  124 (124 B)  |     1 (100) ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉
  Percentiles
  50th      124 (124 B)
  75th      124 (124 B)
  95th      124 (124 B)
  98th      124 (124 B)
  99th      124 (124 B)
  Min       104 (104 B)
  Max       124 (124 B)
Column Count:
  Columns | Count  (%)  Histogram
  4       |     1 (100) ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉
  Percentiles
  50th      4
  75th      4
  95th      4
  98th      4
  99th      4
  Min       4
  Max       4
Estimated cardinality: 1
EncodingStats minTTL: 0
EncodingStats minLocalDeletionTime: 1442880000 (09/22/2015 00:00:00)
EncodingStats minTimestamp: 1539365167498813 (10/12/2018 17:26:07)
KeyType: org.apache.cassandra.db.marshal.UTF8Type
ClusteringTypes: [org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.Int32Type)]
StaticColumns:
RegularColumns: id:org.apache.cassandra.db.marshal.UUIDType, lastname:org.apache.cassandra.db.marshal.UTF8Type

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