@@ -110,8 +110,6 @@ const std::string LDBCommand::ARG_BLOB_FILE_STARTING_LEVEL =
110110const std::string LDBCommand::ARG_PREPOPULATE_BLOB_CACHE =
111111 " prepopulate_blob_cache" ;
112112const std::string LDBCommand::ARG_DECODE_BLOB_INDEX = " decode_blob_index" ;
113- const std::string LDBCommand::ARG_DUMP_UNCOMPRESSED_BLOBS =
114- " dump_uncompressed_blobs" ;
115113const std::string LDBCommand::ARG_READ_TIMESTAMP = " read_timestamp" ;
116114const std::string LDBCommand::ARG_GET_WRITE_UNIX_TIME = " get_write_unix_time" ;
117115
@@ -201,7 +199,7 @@ void DumpSstFile(Options options, std::string filename, bool output_hex,
201199 std::string from_key = " " , std::string to_key = " " );
202200
203201void DumpBlobFile (const std::string& filename, bool is_key_hex,
204- bool is_value_hex, bool dump_uncompressed_blobs );
202+ bool is_value_hex);
205203
206204Status EncodeUserProvidedTimestamp (const std::string& user_timestamp,
207205 std::string* ts_buf);
@@ -2288,13 +2286,12 @@ DBDumperCommand::DBDumperCommand(
22882286 const std::vector<std::string>& /* params*/ ,
22892287 const std::map<std::string, std::string>& options,
22902288 const std::vector<std::string>& flags)
2291- : LDBCommand (
2292- options, flags, true /* is_read_only */ ,
2293- BuildCmdLineOptions (
2294- {ARG_TTL , ARG_HEX , ARG_KEY_HEX , ARG_VALUE_HEX , ARG_FROM , ARG_TO ,
2295- ARG_MAX_KEYS , ARG_COUNT_ONLY , ARG_COUNT_DELIM , ARG_STATS ,
2296- ARG_TTL_START , ARG_TTL_END , ARG_TTL_BUCKET , ARG_TIMESTAMP ,
2297- ARG_PATH , ARG_DECODE_BLOB_INDEX , ARG_DUMP_UNCOMPRESSED_BLOBS })),
2289+ : LDBCommand (options, flags, true /* is_read_only */ ,
2290+ BuildCmdLineOptions (
2291+ {ARG_TTL , ARG_HEX , ARG_KEY_HEX , ARG_VALUE_HEX , ARG_FROM ,
2292+ ARG_TO , ARG_MAX_KEYS , ARG_COUNT_ONLY , ARG_COUNT_DELIM ,
2293+ ARG_STATS , ARG_TTL_START , ARG_TTL_END , ARG_TTL_BUCKET ,
2294+ ARG_TIMESTAMP , ARG_PATH , ARG_DECODE_BLOB_INDEX })),
22982295 null_from_ (true ),
22992296 null_to_ (true ),
23002297 max_keys_ (-1 ),
@@ -2342,7 +2339,6 @@ DBDumperCommand::DBDumperCommand(
23422339 print_stats_ = IsFlagPresent (flags, ARG_STATS );
23432340 count_only_ = IsFlagPresent (flags, ARG_COUNT_ONLY );
23442341 decode_blob_index_ = IsFlagPresent (flags, ARG_DECODE_BLOB_INDEX );
2345- dump_uncompressed_blobs_ = IsFlagPresent (flags, ARG_DUMP_UNCOMPRESSED_BLOBS );
23462342
23472343 if (is_key_hex_) {
23482344 if (!null_from_) {
@@ -2377,7 +2373,6 @@ void DBDumperCommand::Help(std::string& ret) {
23772373 ret.append (" [--" + ARG_TTL_END + " =<N>:- is exclusive]" );
23782374 ret.append (" [--" + ARG_PATH + " =<path_to_a_file>]" );
23792375 ret.append (" [--" + ARG_DECODE_BLOB_INDEX + " ]" );
2380- ret.append (" [--" + ARG_DUMP_UNCOMPRESSED_BLOBS + " ]" );
23812376 ret.append (" \n " );
23822377}
23832378
@@ -2424,8 +2419,7 @@ void DBDumperCommand::DoCommand() {
24242419 /* json_ */ false , column_families_);
24252420 break ;
24262421 case kBlobFile :
2427- DumpBlobFile (path_, is_key_hex_, is_value_hex_,
2428- dump_uncompressed_blobs_);
2422+ DumpBlobFile (path_, is_key_hex_, is_value_hex_);
24292423 break ;
24302424 default :
24312425 exec_state_ = LDBCommandExecuteResult::Failed (
@@ -4718,22 +4712,16 @@ void DumpSstFile(Options options, std::string filename, bool output_hex,
47184712}
47194713
47204714void DumpBlobFile (const std::string& filename, bool is_key_hex,
4721- bool is_value_hex, bool dump_uncompressed_blobs ) {
4715+ bool is_value_hex) {
47224716 using ROCKSDB_NAMESPACE ::blob_db::BlobDumpTool;
47234717 BlobDumpTool tool;
4724- BlobDumpTool::DisplayType blob_type = is_value_hex
4718+ BlobDumpTool::DisplayType show_blob = is_value_hex
47254719 ? BlobDumpTool::DisplayType::kHex
47264720 : BlobDumpTool::DisplayType::kRaw ;
4727- BlobDumpTool::DisplayType show_uncompressed_blob =
4728- dump_uncompressed_blobs ? blob_type : BlobDumpTool::DisplayType::kNone ;
4729- BlobDumpTool::DisplayType show_blob =
4730- dump_uncompressed_blobs ? BlobDumpTool::DisplayType::kNone : blob_type;
4731-
47324721 BlobDumpTool::DisplayType show_key = is_key_hex
47334722 ? BlobDumpTool::DisplayType::kHex
47344723 : BlobDumpTool::DisplayType::kRaw ;
4735- Status s = tool.Run (filename, show_key, show_blob, show_uncompressed_blob,
4736- /* show_summary */ true );
4724+ Status s = tool.Run (filename, show_key, show_blob, /* show_summary */ true );
47374725 if (!s.ok ()) {
47384726 fprintf (stderr, " Failed: %s\n " , s.ToString ().c_str ());
47394727 }
@@ -4757,17 +4745,13 @@ DBFileDumperCommand::DBFileDumperCommand(
47574745 const std::map<std::string, std::string>& options,
47584746 const std::vector<std::string>& flags)
47594747 : LDBCommand(options, flags, true /* is_read_only */ ,
4760- BuildCmdLineOptions (
4761- {ARG_DECODE_BLOB_INDEX , ARG_DUMP_UNCOMPRESSED_BLOBS })),
4762- decode_blob_index_(IsFlagPresent(flags, ARG_DECODE_BLOB_INDEX )),
4763- dump_uncompressed_blobs_(
4764- IsFlagPresent (flags, ARG_DUMP_UNCOMPRESSED_BLOBS )) {}
4748+ BuildCmdLineOptions ({ARG_DECODE_BLOB_INDEX })),
4749+ decode_blob_index_(IsFlagPresent(flags, ARG_DECODE_BLOB_INDEX )) {}
47654750
47664751void DBFileDumperCommand::Help (std::string& ret) {
47674752 ret.append (" " );
47684753 ret.append (DBFileDumperCommand::Name ());
4769- ret.append (" [--" + ARG_DECODE_BLOB_INDEX + " ] " );
4770- ret.append (" [--" + ARG_DUMP_UNCOMPRESSED_BLOBS + " ] " );
4754+ ret.append (" [--" + ARG_DECODE_BLOB_INDEX + " ]" );
47714755 ret.append (" \n " );
47724756}
47734757
@@ -4835,8 +4819,7 @@ void DBFileDumperCommand::DoCommand() {
48354819 filename = NormalizePath (filename);
48364820 std::cout << filename << std::endl;
48374821 std::cout << " ------------------------------" << std::endl;
4838- DumpBlobFile (filename, /* is_key_hex */ false , /* is_value_hex */ false ,
4839- dump_uncompressed_blobs_);
4822+ DumpBlobFile (filename, /* is_key_hex */ false , /* is_value_hex */ false );
48404823 std::cout << std::endl;
48414824 }
48424825 }
0 commit comments