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 ( |
|
Group.
Parentheses ( |
|
Or.
A vertical bar ( |
|
Repeatable.
An ellipsis ( |
|
Single quotation ( |
|
Map collection.
Braces ( |
|
Set, list, map, or tuple.
Angle brackets ( |
|
End CQL statement.
A semicolon ( |
|
Separate the command line options from the command arguments with two hyphens ( |
|
Search CQL only: Single quotation marks ( |
|
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