SSTable utilities

sudo apt-get install cassandra-tools -y

sstableexpiredblockers (TODO)

During compaction, the database can drop entire SSTables when they contain only expired tombstones and if it is guaranteed to not cover any data in other SSTables. This diagnostic tool outputs all SSTables that are blocking other SSTables from being dropped.

sstableexpiredblockers [--dry-run] keyspace table

Choose a keyspace and table to check for any SSTables that are blocking the specified table from dropping.

sstableexpiredblockers ticker symbol_history
sstableexpiredblockers --dry-run ticker symbol_history

sstablelevelreset (TODO)

Reset level to zero on a set of SSTables using LeveledCompactionStrategy.

sstablelevelreset [--really-reset] keyspace table

The option --really-reset is a warning that DataStax Enterprise is stopped before the tool is run.

Stop DataStax Enterprise on the node. Choose a keyspace and table to reset to level 0.

sstablelevelreset ticker symbol_history

This command should be run with Cassandra stopped, otherwise you will get very strange behavior
Verify that Cassandra is not running and then execute the command like this:
Usage: sstablelevelreset --really-reset <keyspace> <table>
sstablelevelreset --really-reset ticker symbol_history

Skipped /var/lib/cassandra/data/ticker/symbol_history-ee07f100592511e8b578f36b98b5be6e/mc-6-big-Data.db since it is already on level 0

If the designated table is already at level 0, then no change occurs. If the SSTable is releveled, the metadata is rewritten to designate the level to 0.

sstableloader (TODO)

The sstableloader provides the ability to:

  • Bulk load external data into a cluster.
  • Load existing SSTables into another cluster with a different number of nodes or replication strategy.
  • Restore snapshots.

sstablemetadata

The sstablemetadata utility prints metadata about a specified SSTable, including:

  • SSTable name
  • Partitioner
  • SSTable level (for LeveledCompactionStrategy (LCS) only)
  • Number of tombstones and Dropped timestamps (in epoch time)
  • Number of cells and size (in bytes) per row

Use this report to troubleshoot wide rows or performance-degrading tombstones.

sstablemetadata sstable_name filenames
sstablemetadata /var/lib/cassandra/data/ticker/symbol_history-ee07f100592511e8b578f36b98b5be6e/mc-6-big-Data.db

SSTable: /var/lib/cassandra/data/ticker/symbol_history-ee07f100592511e8b578f36b98b5be6e/mc-6-big
Partitioner: org.apache.cassandra.dht.Murmur3Partitioner
Bloom Filter FP chance: 0.010000
Minimum timestamp: 1526488052188177
Maximum timestamp: 1526555403295863
SSTable min local deletion time: 1526488052
SSTable max local deletion time: 1527160203
Compressor: org.apache.cassandra.io.compress.LZ4Compressor
Compression ratio: 0.7984886649874056
TTL min: 604800
TTL max: 604800
First token: -266241106592250718 (key=CORP:2016)
Last token: 7366542366527247334 (key=CORP:2015)
minClustringValues: [12, 31]
maxClustringValues: [1, 1]
Estimated droppable tombstones: 0.030388763008890856
SSTable Level: 0
Repaired at: 0
Replay positions covered: {CommitLogPosition(segmentId=1526487044304, position=32842595)=CommitLogPosition(segmentId=1526487044304, position=32843587), CommitLogPosition(segmentId=15265553345
49, position=2057)=CommitLogPosition(segmentId=1526555334549, position=287245)}
totalColumnsSet: 22
totalRows: 6
Estimated tombstone drop times:
1526488080:         1
1527160260:        26
Count               Row Size        Cell Count
1                          0                 0
2                          0                 0
3                          0                 0
4                          0                 0
5                          0                 0
6                          0                 1
7                          0                 0
8                          0                 0
10                         0                 0
12                         0                 0
14                         0                 0
17                         0                 1
20                         0                 0
24                         0                 0
29                         0                 0
35                         0                 0
42                         0                 0
50                         0                 0
60                         0                 0
72                         0                 0
86                         0                 0
103                        0                 0
124                        1                 0
149                        0                 0
179                        0                 0
215                        0                 0
258                        0                 0
310                        1                 0
372                        0                 0
446                        0                 0
535                        0                 0
642                        0                 0
770                        0                 0
924                        0                 0
1109                       0                 0
1331                       0                 0
1597                       0                 0
1916                       0                 0
2299                       0                 0
2759                       0                 0
3311                       0                 0
3973                       0                 0
4768                       0                 0
5722                       0                 0
6866                       0                 0
8239                       0                 0
9887                       0                 0
11864                      0                 0
14237                      0                 0
17084                      0                 0
20501                      0                 0
24601                      0                 0
29521                      0                 0
35425                      0                 0
42510                      0                 0
51012                      0                 0
61214                      0                 0
73457                      0                 0
88148                      0                 0
105778                     0                 0
126934                     0                 0
152321                     0                 0
182785                     0                 0
219342                     0                 0
263210                     0                 0
315852                     0                 0
379022                     0                 0
454826                     0                 0
545791                     0                 0
654949                     0                 0
785939                     0                 0
943127                     0                 0
1131752                    0                 0
1358102                    0                 0
1629722                    0                 0
1955666                    0                 0
2346799                    0                 0
2816159                    0                 0
3379391                    0                 0
4055269                    0                 0
4866323                    0                 0
5839588                    0                 0
7007506                    0                 0
8409007                    0                 0
10090808                   0                 0
12108970                   0                 0
14530764                   0                 0
17436917                   0                 0
20924300                   0                 0
25109160                   0                 0
30130992                   0                 0
36157190                   0                 0
43388628                   0                 0
52066354                   0                 0
62479625                   0                 0
74975550                   0                 0
89970660                   0                 0
107964792                  0                 0
129557750                  0                 0
155469300                  0                 0
186563160                  0                 0
223875792                  0                 0
322381140                  0                 0
386857368                  0                 0
464228842                  0                 0
557074610                  0                 0
668489532                  0                 0
802187438                  0                 0
962624926                  0                 0
1155149911                 0                 0
1386179893                 0                 0
1663415872                 0                 0
1996099046                 0                 0
2395318855                 0                 0
2874382626                 0
3449259151                 0
4139110981                 0
4966933177                 0
5960319812                 0
7152383774                 0
8582860529                 0
10299432635                 0
12359319162                 0
14831182994                 0
17797419593                 0
21356903512                 0
25628284214                 0
30753941057                 0
36904729268                 0
44285675122                 0
53142810146                 0
63771372175                 0
76525646610                 0
91830775932                 0
110196931118                 0
132236317342                 0
158683580810                 0
190420296972                 0
228504356366                 0
274205227639                 0
329046273167                 0
394855527800                 0
473826633360                 0
568591960032                 0
682310352038                 0
818772422446                 0
982526906935                 0
1179032288322                 0
1414838745986                 0
Estimated cardinality: 2
EncodingStats minTTL: 0
EncodingStats minLocalDeletionTime: 1526488045
EncodingStats minTimestamp: 1526488011709104
KeyType: org.apache.cassandra.db.marshal.CompositeType(org.apache.cassandra.db.marshal.UTF8Type,org.apache.cassandra.db.marshal.Int32Type)
ClusteringTypes: [org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.Int32Type), org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.Int32Type)]
StaticColumns: {idx:org.apache.cassandra.db.marshal.UTF8Type}
RegularColumns: {volume:org.apache.cassandra.db.marshal.LongType, high:org.apache.cassandra.db.marshal.DoubleType, low:org.apache.cassandra.db.marshal.DoubleType, close:org.apache.cassandra.db.marshal.DoubleType, open:org.apache.cassandra.db.marshal.DoubleType}

results matching ""

    No results matching ""