|
|
@ -19,9 +19,9 @@ struct SstFileMetaData; |
|
|
|
// The metadata that describes a column family.
|
|
|
|
// The metadata that describes a column family.
|
|
|
|
struct ColumnFamilyMetaData { |
|
|
|
struct ColumnFamilyMetaData { |
|
|
|
ColumnFamilyMetaData() : size(0), name("") {} |
|
|
|
ColumnFamilyMetaData() : size(0), name("") {} |
|
|
|
ColumnFamilyMetaData(const std::string& name, uint64_t size, |
|
|
|
ColumnFamilyMetaData(const std::string& _name, uint64_t _size, |
|
|
|
const std::vector<LevelMetaData>&& levels) : |
|
|
|
const std::vector<LevelMetaData>&& _levels) : |
|
|
|
size(size), name(name), levels(levels) {} |
|
|
|
size(_size), name(_name), levels(_levels) {} |
|
|
|
|
|
|
|
|
|
|
|
// The size of this column family in bytes, which is equal to the sum of
|
|
|
|
// The size of this column family in bytes, which is equal to the sum of
|
|
|
|
// the file size of its "levels".
|
|
|
|
// the file size of its "levels".
|
|
|
@ -36,10 +36,10 @@ struct ColumnFamilyMetaData { |
|
|
|
|
|
|
|
|
|
|
|
// The metadata that describes a level.
|
|
|
|
// The metadata that describes a level.
|
|
|
|
struct LevelMetaData { |
|
|
|
struct LevelMetaData { |
|
|
|
LevelMetaData(int level, uint64_t size, |
|
|
|
LevelMetaData(int _level, uint64_t _size, |
|
|
|
const std::vector<SstFileMetaData>&& files) : |
|
|
|
const std::vector<SstFileMetaData>&& _files) : |
|
|
|
level(level), size(size), |
|
|
|
level(_level), size(_size), |
|
|
|
files(files) {} |
|
|
|
files(_files) {} |
|
|
|
|
|
|
|
|
|
|
|
// The level which this meta data describes.
|
|
|
|
// The level which this meta data describes.
|
|
|
|
const int level; |
|
|
|
const int level; |
|
|
@ -53,17 +53,17 @@ struct LevelMetaData { |
|
|
|
// The metadata that describes a SST file.
|
|
|
|
// The metadata that describes a SST file.
|
|
|
|
struct SstFileMetaData { |
|
|
|
struct SstFileMetaData { |
|
|
|
SstFileMetaData() {} |
|
|
|
SstFileMetaData() {} |
|
|
|
SstFileMetaData(const std::string& file_name, |
|
|
|
SstFileMetaData(const std::string& _file_name, |
|
|
|
const std::string& path, uint64_t size, |
|
|
|
const std::string& _path, uint64_t _size, |
|
|
|
SequenceNumber smallest_seqno, |
|
|
|
SequenceNumber _smallest_seqno, |
|
|
|
SequenceNumber largest_seqno, |
|
|
|
SequenceNumber _largest_seqno, |
|
|
|
const std::string& smallestkey, |
|
|
|
const std::string& _smallestkey, |
|
|
|
const std::string& largestkey, |
|
|
|
const std::string& _largestkey, |
|
|
|
bool being_compacted) : |
|
|
|
bool _being_compacted) : |
|
|
|
size(size), name(file_name), |
|
|
|
size(_size), name(_file_name), |
|
|
|
db_path(path), smallest_seqno(smallest_seqno), largest_seqno(largest_seqno), |
|
|
|
db_path(_path), smallest_seqno(_smallest_seqno), largest_seqno(_largest_seqno), |
|
|
|
smallestkey(smallestkey), largestkey(largestkey), |
|
|
|
smallestkey(_smallestkey), largestkey(_largestkey), |
|
|
|
being_compacted(being_compacted) {} |
|
|
|
being_compacted(_being_compacted) {} |
|
|
|
|
|
|
|
|
|
|
|
// File size in bytes.
|
|
|
|
// File size in bytes.
|
|
|
|
uint64_t size; |
|
|
|
uint64_t size; |
|
|
|