Put column family information in LiveFileMetaData
Summary: As summary Test Plan: compiles :) Reviewers: dhruba, haobo, sdong, yhchiang Reviewed By: haobo CC: leveldb Differential Revision: https://reviews.facebook.net/D18405
This commit is contained in:
parent
a3ab998ef9
commit
096f5be0ed
@ -2742,6 +2742,7 @@ void VersionSet::GetLiveFilesMetaData(std::vector<LiveFileMetaData>* metadata) {
|
|||||||
for (int level = 0; level < cfd->NumberLevels(); level++) {
|
for (int level = 0; level < cfd->NumberLevels(); level++) {
|
||||||
for (const auto& file : cfd->current()->files_[level]) {
|
for (const auto& file : cfd->current()->files_[level]) {
|
||||||
LiveFileMetaData filemetadata;
|
LiveFileMetaData filemetadata;
|
||||||
|
filemetadata.column_family_name = cfd->GetName();
|
||||||
filemetadata.name = TableFileName("", file->number);
|
filemetadata.name = TableFileName("", file->number);
|
||||||
filemetadata.level = level;
|
filemetadata.level = level;
|
||||||
filemetadata.size = file->file_size;
|
filemetadata.size = file->file_size;
|
||||||
|
@ -54,6 +54,7 @@ class Env;
|
|||||||
|
|
||||||
// Metadata associated with each SST file.
|
// Metadata associated with each SST file.
|
||||||
struct LiveFileMetaData {
|
struct LiveFileMetaData {
|
||||||
|
std::string column_family_name; // Name of the column family
|
||||||
std::string name; // Name of the file
|
std::string name; // Name of the file
|
||||||
int level; // Level at which this file resides.
|
int level; // Level at which this file resides.
|
||||||
size_t size; // File size in bytes.
|
size_t size; // File size in bytes.
|
||||||
|
Loading…
Reference in New Issue
Block a user