MCPcopy Create free account
hub / github.com/baidu/tera / OpenImpl

Method OpenImpl

src/leveldb/persistent_cache/persistent_cache_file.cc:32–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30Status RandomAccessCacheFile::Open() { return OpenImpl(); }
31
32Status RandomAccessCacheFile::OpenImpl() {
33 RandomAccessFile* file;
34 auto status = env_->NewRandomAccessFile(Path(), &file, env_opt_);
35 if (!status.ok()) {
36 LEVELDB_LOG("Error opening random access file %s. %s\n", Path().c_str(),
37 status.ToString().c_str());
38 } else {
39 file_.reset(file);
40 }
41
42 return status;
43}
44
45Status RandomAccessCacheFile::Read(size_t offset, size_t length, Slice* val,
46 SstDataScratch* scratch) {

Callers

nothing calls this directly

Calls 4

NewRandomAccessFileMethod · 0.45
okMethod · 0.45
ToStringMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected