| 3589 | } // namespace |
| 3590 | |
| 3591 | Status InitializeS3(const S3GlobalOptions& options) { |
| 3592 | ARROW_ASSIGN_OR_RAISE(bool successfully_initialized, |
| 3593 | EnsureAwsInstanceInitialized(options)); |
| 3594 | if (!successfully_initialized) { |
| 3595 | return Status::Invalid( |
| 3596 | "S3 was already initialized. It is safe to use but the options passed in this " |
| 3597 | "call have been ignored."); |
| 3598 | } |
| 3599 | return Status::OK(); |
| 3600 | } |
| 3601 | |
| 3602 | Status EnsureS3Initialized() { |
| 3603 | return EnsureAwsInstanceInitialized(S3GlobalOptions::Defaults()).status(); |