MCPcopy Create free account
hub / github.com/chen3feng/toft / GetEntryCount

Method GetEntryCount

storage/sstable/reader/sstable_reader.cpp:71–84  ·  view source on GitHub ↗

Static

Source from the content-addressed store, hash-verified

69
70// Static
71bool 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
87const std::string SSTableReader::GetMetaData(const std::string &key) const {

Callers

nothing calls this directly

Calls 2

entry_countMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected