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

Method DumpMetaCache

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

Source from the content-addressed store, hash-verified

1150}
1151
1152Status DataCache::Partition::DumpMetaCache(DumpData& dump_data) {
1153 lock_.DCheckLocked();
1154 DCHECK(dump_data.cache_files_data.size() == dump_data.file_indexs.size());
1155
1156 // Walk through the meta cache, taking all keys and entries and dumping them one by one.
1157 vector<Cache::UniqueHandle> handles = meta_cache_->Dump();
1158 for (const auto& handle : handles) {
1159 CacheEntry entry(meta_cache_->Value(handle));
1160 auto index_iter = dump_data.file_indexs.find(entry.file());
1161 // If the entry's cache file is not in the list, we do not need to dump it.
1162 if (index_iter == dump_data.file_indexs.end()) continue;
1163 dump_data.meta_cache_data.emplace_back(meta_cache_->Key(handle).ToString(),
1164 index_iter->second, entry.offset(), entry.len(), entry.checksum());
1165 }
1166 return Status::OK();
1167}
1168
1169Status DataCache::Partition::LoadMetaCache(const DumpData& dump_data) {
1170 lock_.DCheckLocked();

Callers

nothing calls this directly

Calls 13

OKFunction · 0.85
DCheckLockedMethod · 0.80
checksumMethod · 0.80
sizeMethod · 0.45
DumpMethod · 0.45
ValueMethod · 0.45
findMethod · 0.45
fileMethod · 0.45
endMethod · 0.45
ToStringMethod · 0.45
KeyMethod · 0.45
offsetMethod · 0.45

Tested by

no test coverage detected