MCPcopy Create free account
hub / github.com/apache/arrow / MoveMaterialTo

Method MoveMaterialTo

cpp/src/parquet/encryption/file_system_key_material_store.cc:124–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122}
123
124void FileSystemKeyMaterialStore::MoveMaterialTo(
125 std::shared_ptr<FileKeyMaterialStore> target_key_store) {
126 auto target_key_file_store =
127 std::dynamic_pointer_cast<FileSystemKeyMaterialStore>(target_key_store);
128 if (target_key_file_store == nullptr) {
129 throw ParquetException(
130 "Cannot move key material to a store that is not a FileSystemKeyMaterialStore");
131 }
132 std::string target_key_material_file = target_key_file_store->GetStorageFilePath();
133 auto status = file_system_->Move(key_material_file_path_, target_key_material_file);
134 if (!status.ok()) {
135 std::stringstream ss;
136 ss << "Failed to move key material file '" << key_material_file_path_ << "' to '"
137 << target_key_material_file << "': " << status;
138 throw ParquetException(ss.str());
139 }
140}
141
142} // namespace parquet::encryption

Callers 1

RotateMasterKeysMethod · 0.80

Calls 4

ParquetExceptionFunction · 0.85
strMethod · 0.80
MoveMethod · 0.45
okMethod · 0.45

Tested by

no test coverage detected