]>
git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/db/blob/blob_file_meta.cc
1 // Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
2 // This source code is licensed under both the GPLv2 (found in the
3 // COPYING file in the root directory) and Apache 2.0 License
4 // (found in the LICENSE.Apache file in the root directory).
6 #include "db/blob/blob_file_meta.h"
11 namespace ROCKSDB_NAMESPACE
{
13 std::string
SharedBlobFileMetaData::DebugString() const {
14 std::ostringstream oss
;
20 std::ostream
& operator<<(std::ostream
& os
,
21 const SharedBlobFileMetaData
& shared_meta
) {
22 os
<< "blob_file_number: " << shared_meta
.GetBlobFileNumber()
23 << " total_blob_count: " << shared_meta
.GetTotalBlobCount()
24 << " total_blob_bytes: " << shared_meta
.GetTotalBlobBytes()
25 << " checksum_method: " << shared_meta
.GetChecksumMethod()
26 << " checksum_value: " << shared_meta
.GetChecksumValue();
31 std::string
BlobFileMetaData::DebugString() const {
32 std::ostringstream oss
;
38 std::ostream
& operator<<(std::ostream
& os
, const BlobFileMetaData
& meta
) {
39 const auto& shared_meta
= meta
.GetSharedMeta();
43 os
<< " linked_ssts: {";
44 for (uint64_t file_number
: meta
.GetLinkedSsts()) {
45 os
<< ' ' << file_number
;
49 os
<< " garbage_blob_count: " << meta
.GetGarbageBlobCount()
50 << " garbage_blob_bytes: " << meta
.GetGarbageBlobBytes();
55 } // namespace ROCKSDB_NAMESPACE