Wednesday, August 22, 2018

RocksDB: sst_dump

An example to show what RocksDB sst_dump and how it is used. One of the benefits for my project is to take a quick pick at the contents and dumping the contents to a flat file. This tool is sensitive to how the database is first open and the type of "comparator" used. The tool originally developed by LevelDB, that is an assumed a default comparator.

Using sst_dump to scan through entire 000007.sst file and read only 10 rows out in hex format.

./sst_dump --file=rocksdb --command=scan --read_num=10 --output_hex


/sst_dump --file=/home/ubuntu/dbtest1_bk --command=scan --read_num=10 --output_hex
from [] to []
Process /home/ubuntu/dbtest1_bk/000007.sst
Sst file format: block-based
'01000000010000000000000000000000000000000000000000085A000000000000' seq:57025, type:1 => 0000000000000000000000000000000000000000000000B914F558714F052622
'010000000100000000000000000000000000000000000000004B59000000000000' seq:56553, type:1 => 0000000000000000000000000000000000000000000000B8CF95546DAED7A770
'010000000100000000000000000000000000000000000000005658000000000000' seq:55933, type:1 => 0000000000000000000000000000000000000000000000B88A31C2EB69E3A770
'010000000100000000000000000000000000000000000000005956000000000000' seq:54697, type:1 => 0000000000000000000000000000000000000000000000B88A31BF2C26C0B770
'01000000010000000000000000000000000000000000000000E255000000000000' seq:54410, type:1 => 0000000000000000000000000000000000000000000000B889801C6FF7FBB770
'010000000100000000000000000000000000000000000000005755000000000000' seq:54082, type:1 => 0000000000000000000000000000000000000000000000B7F0D842B7C6AFB770
'010000000100000000000000000000000000000000000000005754000000000000' seq:53462, type:1 => 0000000000000000000000000000000000000000000000B7EF74FD3F6925B770
'01000000010000000000000000000000000000000000000000BA53000000000000' seq:53087, type:1 => 0000000000000000000000000000000000000000000000B7EB4B2CD65087B770
'010000000100000000000000000000000000000000000000001452000000000000' seq:52049, type:1 => 000000000000000000000000000000000000000000000081B5817F1071E7B770
'01000000010000000000000000000000000000000000000000F351000000000000' seq:51968, type:1 => 000000000000000000000000000000000000000000000081A7A0C85CCA83B770


1 comment:

  1. Casino: Slot Machines, Blackjack, Video Poker, Video - DRMCD
    Online Gaming. Casino 경상북도 출장마사지 - 삼척 출장샵 Blackjack, Video Poker, Video Poker, Video 경주 출장안마 Poker, Video Poker, Video Poker, Video Poker, Video 안양 출장마사지 Poker. 경주 출장샵

    ReplyDelete