The dumpsst command is used to display the contents of a block file. You can use the macro_block option to investigate and trace online issues, locate data problems, and more. This topic describes how to use the dumpsst command.
You can run the dumpsst command to view the syntax.
$ ./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 example shows a common usage of the dumpsst command.
macro_block
You can run the following command to display the contents of an SSTable data block, including the common header, macro header, microblock index information, microblock header, and data. This is the most commonly used command. The 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>
The following table describes the parameters.
-d: specifies the type of macro block to be dumped. Currently, onlymacro_blockis supported.-f: specifies the absolute path of the folder where the data file is stored.-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.
