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

Method LoadFile

storage/sstable/reader/sstable_reader_impl.cpp:139–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137SSTableReader::Impl::~Impl() {}
138
139bool SSTableReader::Impl::LoadFile(const std::string &path) {
140 CHECK(!file_base_.get()) << "the sstable is already opened.";
141 path_ = path;
142 MutexLocker l(&mutex_);
143 file_base_.reset(File::Open(path, "r"));
144 if (!file_base_.get()) {
145 LOG(ERROR)<< "open sstable failed: " << path;
146 return false;
147 }
148
149 return LoadFileInfo(file_base_.get(), data_index_.get(), file_info_.get(), file_trailer_.get());
150}
151
152const std::string SSTableReader::Impl::GetMetaData(const std::string &key) const {
153 std::vector<std::pair<std::string, std::string> >::const_iterator iter = file_info_->meta_items

Callers 1

OpenMethod · 0.80

Calls 2

getMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected