From 052299035803827efa6f1c2cb28d3dc3c6e8b1f7 Mon Sep 17 00:00:00 2001 From: Islam AbdelRahman Date: Fri, 8 Apr 2016 12:05:02 -0700 Subject: [PATCH] Improve sst_dump help message Summary: Current Message ``` sst_dump [--command=check|scan|none|raw] [--verify_checksum] --file=data_dir_OR_sst_file [--output_hex] [--input_key_hex] [--from=] [--to=] [--read_num=NUM] [--show_properties] [--show_compression_sizes] [--show_compression_sizes [--set_block_size=]] ``` New message ``` sst_dump --file= [--command=check|scan|raw] --file= Path to SST file or directory containing SST files --command=check|scan|raw check: Iterate over entries in files but dont print anything except if an error is encounterd (default command) scan: Iterate over entries in files and print them to screen raw: Dump all the table contents to _dump.txt --output_hex Can be combined with scan command to print the keys and values in Hex --from= Key to start reading from when executing check|scan --to= Key to stop reading at when executing check|scan --read_num= Maximum number of entries to read when executing check|scan --verify_checksum Verify file checksum when executing check|scan --input_key_hex Can be combined with --from and --to to indicate that these values are encoded in Hex --show_properties Print table properties after iterating over the file --show_compression_sizes Independent command that will recreate the SST file using 16K block size with different compressions and report the size of the file using such compression --set_block_size= Can be combined with --show_compression_sizes to set the block size that will be used when trying different compression algorithms ``` Test Plan: none Reviewers: yhchiang, andrewkr, kradhakrishnan, yiwu, sdong Reviewed By: sdong Subscribers: andrewkr, dhruba Differential Revision: https://reviews.facebook.net/D56325 --- tools/sst_dump_tool.cc | 48 +++++++++++++++++++++++++++++++++--------- 1 file changed, 38 insertions(+), 10 deletions(-) diff --git a/tools/sst_dump_tool.cc b/tools/sst_dump_tool.cc index 3e6b16e13..6890c9cdc 100644 --- a/tools/sst_dump_tool.cc +++ b/tools/sst_dump_tool.cc @@ -348,16 +348,44 @@ namespace { void print_help() { fprintf(stderr, - "sst_dump [--command=check|scan|none|raw] [--verify_checksum] " - "--file=data_dir_OR_sst_file" - " [--output_hex]" - " [--input_key_hex]" - " [--from=]" - " [--to=]" - " [--read_num=NUM]" - " [--show_properties]" - " [--show_compression_sizes]" - " [--show_compression_sizes [--set_block_size=]]\n"); + R"(sst_dump --file= [--command=check|scan|raw] + --file= + Path to SST file or directory containing SST files + + --command=check|scan|raw + check: Iterate over entries in files but dont print anything except if an error is encounterd (default command) + scan: Iterate over entries in files and print them to screen + raw: Dump all the table contents to _dump.txt + + --output_hex + Can be combined with scan command to print the keys and values in Hex + + --from= + Key to start reading from when executing check|scan + + --to= + Key to stop reading at when executing check|scan + + --read_num= + Maximum number of entries to read when executing check|scan + + --verify_checksum + Verify file checksum when executing check|scan + + --input_key_hex + Can be combined with --from and --to to indicate that these values are encoded in Hex + + --show_properties + Print table properties after iterating over the file + + --show_compression_sizes + Independent command that will recreate the SST file using 16K block size with different + compressions and report the size of the file using such compression + + --set_block_size= + Can be combined with --show_compression_sizes to set the block size that will be used + when trying different compression algorithms +)"); } } // namespace