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

Method DumpCacheFiles

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

Source from the content-addressed store, hash-verified

1112}
1113
1114Status DataCache::Partition::DumpCacheFiles(DumpData& dump_data) {
1115 lock_.DCheckLocked();
1116 int64_t index = 0;
1117 for (const auto& file : cache_files_) {
1118 // There is no need to dump closed file, it can no longer be read or written or even
1119 // deleted.
1120 if (file->closed()) continue;
1121
1122 // Just to be safe, flush the file.
1123 RETURN_IF_ERROR(file->Flush());
1124
1125 dump_data.cache_files_data.emplace_back(file->path(), file->allow_append(),
1126 file->current_offset(), file->mtime());
1127 auto result = dump_data.file_indexs.emplace(file.get(), index++);
1128 DCHECK(result.second);
1129 }
1130 return Status::OK();
1131}
1132
1133Status DataCache::Partition::LoadCacheFiles(const DumpData& dump_data) {
1134 lock_.DCheckLocked();

Callers

nothing calls this directly

Calls 9

OKFunction · 0.85
DCheckLockedMethod · 0.80
pathMethod · 0.80
allow_appendMethod · 0.80
current_offsetMethod · 0.80
getMethod · 0.65
closedMethod · 0.45
FlushMethod · 0.45
mtimeMethod · 0.45

Tested by

no test coverage detected