Skip to content

Commit

Permalink
Put column family information in LiveFileMetaData
Browse files Browse the repository at this point in the history
Summary: As summary

Test Plan: compiles :)

Reviewers: dhruba, haobo, sdong, yhchiang

Reviewed By: haobo

CC: leveldb

Differential Revision: https://reviews.facebook.net/D18405
  • Loading branch information
igorcanadi committed Apr 30, 2014
1 parent a3ab998 commit 096f5be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions db/version_set.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2742,6 +2742,7 @@ void VersionSet::GetLiveFilesMetaData(std::vector<LiveFileMetaData>* metadata) {
for (int level = 0; level < cfd->NumberLevels(); level++) {
for (const auto& file : cfd->current()->files_[level]) {
LiveFileMetaData filemetadata;
filemetadata.column_family_name = cfd->GetName();
filemetadata.name = TableFileName("", file->number);
filemetadata.level = level;
filemetadata.size = file->file_size;
Expand Down
3 changes: 2 additions & 1 deletion include/rocksdb/db.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ class Env;

// Metadata associated with each SST file.
struct LiveFileMetaData {
std::string name; // Name of the file
std::string column_family_name; // Name of the column family
std::string name; // Name of the file
int level; // Level at which this file resides.
size_t size; // File size in bytes.
std::string smallestkey; // Smallest user defined key in the file.
Expand Down

0 comments on commit 096f5be

Please sign in to comment.