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

Method ProcessListBuckets

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

Source from the content-addressed store, hash-verified

2953 }
2954
2955 static Result<std::vector<std::string>> ProcessListBuckets(
2956 const Aws::S3::Model::ListBucketsOutcome& outcome) {
2957 if (!outcome.IsSuccess()) {
2958 return ErrorToStatus(std::forward_as_tuple("When listing buckets: "), "ListBuckets",
2959 outcome.GetError());
2960 }
2961 std::vector<std::string> buckets;
2962 buckets.reserve(outcome.GetResult().GetBuckets().size());
2963 for (const auto& bucket : outcome.GetResult().GetBuckets()) {
2964 buckets.emplace_back(FromAwsString(bucket.GetName()));
2965 }
2966 return buckets;
2967 }
2968
2969 Result<std::vector<std::string>> ListBuckets() {
2970 ARROW_ASSIGN_OR_RAISE(auto client_lock, holder_->Lock());

Callers 1

ListBucketsAsyncMethod · 0.95

Calls 7

ErrorToStatusFunction · 0.85
FromAwsStringFunction · 0.85
emplace_backMethod · 0.80
reserveMethod · 0.45
sizeMethod · 0.45
GetResultMethod · 0.45
GetNameMethod · 0.45

Tested by

no test coverage detected