The dumpsst command is used to display the contents of a block file. It can be used to investigate and trace online issues, locate data problems, and more. This topic will introduce how to use the dumpsst command.
You can use this command to output the usage of dumpsst.
$ ./ob_admin dumpsst --help
succ to open, filename=ob_admin.log, fd=3, wf_fd=2
old log_file need close, old = ob_admin.log new = ob_admin.log
succ to open, filename=ob_admin.log, fd=3, wf_fd=2
succ to open, filename=ob_admin_rs.log, fd=4, wf_fd=2
Usage: dumpsst command [command args] [options]
commands:
-d,--dump dump, arg:[macro_block]
-h,--help display this message.
options:
-f,--data-file-name data file path or the ofs address
-a,--macro-id macro block id
-i,--micro-id micro block id, -1 means all micro blocks
-n,--macro-size macro block size, in bytes
-q,--quiet log level: ERROR
-x,--hex-print print obj value in hex mode
-k,--master_key master key, hex str
-m,--master_key_id master key id
-t,--tablet_id tablet id
-s,--logical_version macro block logical version
samples:
dump all rows in macro:
ob_admin dumpsst -d macro_block -f block_file_path -a macro_id
dump specified block in the shared block:
ob_admin dumpsst -d macro_block -f block_file_path -a macro_id -t tablet_id -s logical_version
The following section describes a common use case for dumpsst.
macro_block
You can use the following command to display the contents of an SSTable data block, including the macro block common header, macro header, microblock index information, microblock header, and each data record. This is the most commonly used command, and its syntax is as follows:
# In local mode:
./ob_admin dumpsst -d macro_block -f <block_file_path> -a <macro_id>
./ob_admin dumpsst -d macro_block -f <block_file_path> -a <macro_id> -t <tablet_id> -s <logical_version>
Here are the parameters:
-d: specifies the type of macro block to dump. Currently, onlymacro_blockis supported.-f: specifies the absolute path of the folder where the data file is located.-a: specifies the index of the macro block.-t: specifies the index of the tablet.-s: specifies the logical version number of the macro block.
