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

Method Make

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

Source from the content-addressed store, hash-verified

40 file_system_{std::move(file_system)} {}
41
42std::shared_ptr<FileSystemKeyMaterialStore> FileSystemKeyMaterialStore::Make(
43 std::string parquet_file_path, std::shared_ptr<::arrow::fs::FileSystem> file_system,
44 bool use_tmp_prefix) {
45 if (parquet_file_path.empty()) {
46 throw ParquetException(
47 "The Parquet file path must be specified when using external key material");
48 }
49 if (file_system == nullptr) {
50 throw ParquetException(
51 "A file system must be specified when using external key material");
52 }
53
54 ::arrow::fs::FileInfo file_info(std::move(parquet_file_path));
55 std::stringstream key_material_file_name;
56 if (use_tmp_prefix) {
57 key_material_file_name << FileSystemKeyMaterialStore::kTempFilePrefix;
58 }
59 key_material_file_name << FileSystemKeyMaterialStore::kKeyMaterialFilePrefix
60 << file_info.base_name()
61 << FileSystemKeyMaterialStore::kKeyMaterialFileSuffix;
62
63 std::string key_material_file_path = ::arrow::fs::internal::ConcatAbstractPath(
64 file_info.dir_name(), key_material_file_name.str());
65 return std::make_shared<FileSystemKeyMaterialStore>(std::move(key_material_file_path),
66 std::move(file_system));
67}
68
69void FileSystemKeyMaterialStore::LoadKeyMaterialMap() {
70 std::shared_ptr<::arrow::io::RandomAccessFile> input;

Callers

nothing calls this directly

Calls 6

ParquetExceptionFunction · 0.85
ConcatAbstractPathFunction · 0.85
base_nameMethod · 0.80
dir_nameMethod · 0.80
strMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected