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

Method InitServerAndClient

cpp/src/arrow/filesystem/s3fs_test.cc:221–240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219
220 protected:
221 Status InitServerAndClient() {
222 ARROW_ASSIGN_OR_RAISE(minio_, GetMinioEnv(enable_tls_)->GetOneServer());
223 client_config_.reset(new Aws::Client::ClientConfiguration());
224 client_config_->endpointOverride = ToAwsString(minio_->connect_string());
225 if (minio_->scheme() == "https") {
226 client_config_->scheme = Aws::Http::Scheme::HTTPS;
227 client_config_->caFile = ToAwsString(minio_->ca_file_path());
228 } else {
229 client_config_->scheme = Aws::Http::Scheme::HTTP;
230 }
231 client_config_->retryStrategy =
232 std::make_shared<ConnectRetryStrategy>(kRetryInterval, kMaxRetryDuration);
233 credentials_ = {ToAwsString(minio_->access_key()), ToAwsString(minio_->secret_key())};
234 bool use_virtual_addressing = false;
235 client_.reset(
236 new Aws::S3::S3Client(credentials_, *client_config_,
237 Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy::Never,
238 use_virtual_addressing));
239 return Status::OK();
240 }
241
242 // How many times to try launching a server in a row before decreeing failure
243 static constexpr int kNumServerRetries = 3;

Callers

nothing calls this directly

Calls 11

ToAwsStringFunction · 0.85
GetOneServerMethod · 0.80
connect_stringMethod · 0.80
ca_file_pathMethod · 0.80
access_keyMethod · 0.80
secret_keyMethod · 0.80
GetMinioEnvFunction · 0.70
ARROW_ASSIGN_OR_RAISEFunction · 0.50
OKFunction · 0.50
resetMethod · 0.45
schemeMethod · 0.45

Tested by

no test coverage detected