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

Method ProcessListBuckets

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

Source from the content-addressed store, hash-verified

3012 }
3013
3014 static Result<std::vector<std::string>> ProcessListBuckets(
3015 const Aws::S3::Model::ListBucketsOutcome& outcome) {
3016 if (!outcome.IsSuccess()) {
3017 return ErrorToStatus(std::forward_as_tuple("When listing buckets: "), "ListBuckets",
3018 outcome.GetError());
3019 }
3020 std::vector<std::string> buckets;
3021 buckets.reserve(outcome.GetResult().GetBuckets().size());
3022 for (const auto& bucket : outcome.GetResult().GetBuckets()) {
3023 buckets.emplace_back(FromAwsString(bucket.GetName()));
3024 }
3025 return buckets;
3026 }
3027
3028 Result<std::vector<std::string>> ListBuckets() {
3029 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