westonpace commented on a change in pull request #11136:
URL: https://github.com/apache/arrow/pull/11136#discussion_r710006645
##########
File path: ci/etc/minio-no-create-bucket-policy.json
##########
@@ -0,0 +1,20 @@
+{
Review comment:
It was intended for an eventual regression test (which I've now added).
##########
File path: cpp/src/arrow/filesystem/s3fs.cc
##########
@@ -1530,6 +1529,23 @@ class S3FileSystem::Impl : public
std::enable_shared_from_this<S3FileSystem::Imp
}
}
+ // Tests to see if a bucket exists
+ Result<bool> BucketExists(const std::string& bucket) {
+ S3Model::HeadBucketRequest req;
+ req.SetBucket(ToAwsString(bucket));
+
+ auto outcome = client_->HeadBucket(req);
+ if (!outcome.IsSuccess()) {
+ if (!IsNotFound(outcome.GetError())) {
+ return ErrorToStatus(
+ std::forward_as_tuple("When testing for bucket existence '",
bucket, "': "),
Review comment:
Fixed up
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]