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

Function ResolveS3BucketRegion

cpp/src/arrow/filesystem/s3fs.cc:3592–3602  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3590// Top-level utility functions
3591
3592Result<std::string> ResolveS3BucketRegion(const std::string& bucket) {
3593 RETURN_NOT_OK(CheckS3Initialized());
3594
3595 if (bucket.empty() || bucket.find_first_of(kSep) != bucket.npos ||
3596 internal::IsLikelyUri(bucket)) {
3597 return Status::Invalid("Not a valid bucket name: '", bucket, "'");
3598 }
3599
3600 ARROW_ASSIGN_OR_RAISE(auto resolver, RegionResolver::DefaultInstance());
3601 return resolver->ResolveRegion(bucket);
3602}
3603
3604auto kS3FileSystemModule = ARROW_REGISTER_FILESYSTEM(
3605 "s3",

Callers 3

TEST_FFunction · 0.85
FromUriMethod · 0.85
TestMainFunction · 0.85

Calls 5

CheckS3InitializedFunction · 0.85
IsLikelyUriFunction · 0.85
ResolveRegionMethod · 0.80
InvalidFunction · 0.50
emptyMethod · 0.45

Tested by 2

TEST_FFunction · 0.68
TestMainFunction · 0.68