Static
| 69 | |
| 70 | // Static |
| 71 | bool SSTableReader::GetEntryCount(const std::string &path, int *count) { |
| 72 | toft::scoped_ptr<File> file(File::Open(path, "r")); |
| 73 | if (!file.get()) { |
| 74 | LOG(ERROR)<< "open sstable failed: " << path; |
| 75 | return false; |
| 76 | } |
| 77 | |
| 78 | hfile::FileTrailer file_trailer; |
| 79 | if (!Impl::LoadFileInfo(file.get(), NULL, NULL, &file_trailer)) |
| 80 | return false; |
| 81 | |
| 82 | *count = file_trailer.entry_count(); |
| 83 | return true; |
| 84 | } |
| 85 | |
| 86 | // Not static, get meta data in meta data blocks |
| 87 | const std::string SSTableReader::GetMetaData(const std::string &key) const { |
nothing calls this directly
no test coverage detected