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

Method Dump

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

Source from the content-addressed store, hash-verified

1055}
1056
1057Status DataCache::Partition::Dump() {
1058 std::unique_lock<SpinLock> partition_lock(lock_);
1059 LOG(INFO) << Substitute("Partition $0 start dumping.", index_);
1060 DumpData dump_data;
1061 RETURN_IF_ERROR(DumpCacheFiles(dump_data));
1062 RETURN_IF_ERROR(DumpMetaCache(dump_data));
1063 std::ofstream file;
1064 file.open(JoinPathSegments(path_, DUMP_FILE_NAME), std::ofstream::binary);
1065 if (!file) return Status(Substitute("Failed to open $0", DUMP_FILE_NAME));
1066 try {
1067 dump_data.serialize(file);
1068 } catch (boost::archive::archive_exception& e) {
1069 LOG(ERROR) << Substitute("Partition $0 failed to serialize dump file.", index_)
1070 << e.what();
1071 return Status("Failed to serialize dump file.");
1072 }
1073 file.close();
1074 LOG(INFO) << Substitute("Partition $0 dump successfully.", index_);
1075 return Status::OK();
1076}
1077
1078Status DataCache::Partition::Load() {
1079 std::ifstream file;

Callers 3

DumpDataCacheMethod · 0.45
TEST_PFunction · 0.45
DumpMetaCacheMethod · 0.45

Calls 7

SubstituteFunction · 0.85
JoinPathSegmentsFunction · 0.85
OKFunction · 0.85
openMethod · 0.65
closeMethod · 0.65
StatusClass · 0.50
serializeMethod · 0.45

Tested by 1

TEST_PFunction · 0.36