MCPcopy Create free account
hub / github.com/apache/impala / LoadCacheFiles

Method LoadCacheFiles

be/src/runtime/io/data-cache.cc:1133–1150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1131}
1132
1133Status DataCache::Partition::LoadCacheFiles(const DumpData& dump_data) {
1134 lock_.DCheckLocked();
1135 cache_files_.clear();
1136 for (const DumpData::CacheFileData& file_data : dump_data.cache_files_data) {
1137 unique_ptr<CacheFile> cache_file;
1138 RETURN_IF_ERROR(CacheFile::Open(file_data.path, file_data.allow_append,
1139 file_data.current_offset, &cache_file));
1140 if (file_data.mtime != cache_file->mtime()) {
1141 return Status("The actual mtime of the cache file does not match the dumped data.");
1142 }
1143 cache_files_.emplace_back(std::move(cache_file));
1144 }
1145 if (cache_files_.empty()) {
1146 return Status("No cache files loaded.");
1147 }
1148 oldest_opened_file_ = 0;
1149 return Status::OK();
1150}
1151
1152Status DataCache::Partition::DumpMetaCache(DumpData& dump_data) {
1153 lock_.DCheckLocked();

Callers

nothing calls this directly

Calls 7

moveFunction · 0.85
OKFunction · 0.85
DCheckLockedMethod · 0.80
clearMethod · 0.65
StatusClass · 0.50
mtimeMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected