From d71e728c7a5634a0692968f610216a6aedfb67ca Mon Sep 17 00:00:00 2001 From: Islam AbdelRahman Date: Wed, 14 Dec 2016 11:09:50 -0800 Subject: [PATCH] Print user collected properties in sst_dump Summary: Include a dump of user_collected_properties in sst_dump Closes https://github.com/facebook/rocksdb/pull/1668 Differential Revision: D4325078 Pulled By: IslamAbdelRahman fbshipit-source-id: 226b6d6 --- tools/sst_dump_tool.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/sst_dump_tool.cc b/tools/sst_dump_tool.cc index 532120ab6..725d1d252 100644 --- a/tools/sst_dump_tool.cc +++ b/tools/sst_dump_tool.cc @@ -591,6 +591,14 @@ int SSTDumpTool::Run(int argc, char** argv) { fprintf(stdout, " # merge operands: UNKNOWN\n"); } } + fprintf(stdout, + "Raw user collected properties\n" + "------------------------------\n"); + for (const auto& kv : table_properties->user_collected_properties) { + std::string prop_name = kv.first; + std::string prop_val = Slice(kv.second).ToString(true); + fprintf(stdout, " # %s: 0x%s\n", prop_name.c_str(), prop_val.c_str()); + } } } return 0;