mirror of https://github.com/facebook/rocksdb.git
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
This commit is contained in:
parent
036d668b19
commit
b797e42157
|
@ -1963,6 +1963,21 @@ Status BlockBasedTable::DumpTable(WritableFile* out_file) {
|
|||
if (!s.ok()) {
|
||||
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
|
||||
auto* range_del_iter = NewRangeTombstoneIterator(ReadOptions());
|
||||
if (range_del_iter != nullptr) {
|
||||
|
|
Loading…
Reference in New Issue