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

Method InitServerAndClient

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

Source from the content-addressed store, hash-verified

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