| 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; |
nothing calls this directly
no test coverage detected