dumpsst

2025-01-26 09:36:34  Updated

dumpsst displays the content in block_file. You can use it to trace online issues and locate data issues based on macroblocks. This topic describes how to use dumpsst.

You can run the following command to query the help information 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 -d macro_block -f block_file_path -a macro_id
  dump specified block in the shared block:
        ob_admin -d macro_block -f block_file_path -a macro_id -t tablet_id -s logical_version

The following example shows a common usage of dumpsst.

macro_block

You can use the following syntaxes to show the content of an SSTable block, including the macroblock common header, macro header, microblock index, microblock header, and each data record. These syntaxes are most frequently used.

# 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 options are described as follows:

  • -d specifies the type of the dump macroblock. At present, only the macro_block type is supported.
  • -f specifies the absolute path of the folder where the data file is located.
  • -a specifies the subscript of the macroblock.
  • -t specifies the subscript of the shard.
  • -s specifies the logical version number of the macroblock.

Contact Us