Dump compression dictionary meta-block

Summary:
make sst_dump print size/contents of the dictionary meta-block for easier debugging
Closes https://github.com/facebook/rocksdb/pull/1837

Differential Revision: D4506399

Pulled By: ajkr

fbshipit-source-id: b9bf668
main
Andrew Kryczka 8 years ago committed by Facebook Github Bot
parent 036d668b19
commit b797e42157
  1. 15
      table/block_based_table_reader.cc

@ -1963,6 +1963,21 @@ Status BlockBasedTable::DumpTable(WritableFile* out_file) {
if (!s.ok()) { if (!s.ok()) {
return s; return s;
} }
// Output compression dictionary
if (rep_->compression_dict_block != nullptr) {
auto compression_dict = rep_->compression_dict_block->data;
out_file->Append(
"Compression Dictionary:\n"
"--------------------------------------\n");
out_file->Append(" size (bytes): ");
out_file->Append(rocksdb::ToString(compression_dict.size()));
out_file->Append("\n\n");
out_file->Append(" HEX ");
out_file->Append(compression_dict.ToString(true).c_str());
out_file->Append("\n\n");
}
// Output range deletions block // Output range deletions block
auto* range_del_iter = NewRangeTombstoneIterator(ReadOptions()); auto* range_del_iter = NewRangeTombstoneIterator(ReadOptions());
if (range_del_iter != nullptr) { if (range_del_iter != nullptr) {

Loading…
Cancel
Save