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

Method GetKmsClient

cpp/src/parquet/encryption/key_toolkit.cc:32–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30namespace parquet::encryption {
31
32std::shared_ptr<KmsClient> KeyToolkit::GetKmsClient(
33 const KmsConnectionConfig& kms_connection_config, double cache_entry_lifetime_ms) {
34 if (kms_client_factory_ == nullptr) {
35 throw ParquetException("No KmsClientFactory is registered.");
36 }
37 auto kms_client_per_kms_instance_cache = kms_client_cache_.GetOrCreateInternalCache(
38 kms_connection_config.key_access_token(), cache_entry_lifetime_ms);
39
40 return kms_client_per_kms_instance_cache->GetOrInsert(
41 kms_connection_config.kms_instance_id, [this, kms_connection_config]() {
42 return this->kms_client_factory_->CreateKmsClient(kms_connection_config);
43 });
44}
45
46void KeyToolkit::RotateMasterKeys(
47 const KmsConnectionConfig& kms_connection_config,

Callers 2

FileKeyWrapperMethod · 0.80

Calls 4

ParquetExceptionFunction · 0.85
GetOrInsertMethod · 0.45
CreateKmsClientMethod · 0.45

Tested by

no test coverage detected