felipecrv commented on code in PR #38888:
URL: https://github.com/apache/arrow/pull/38888#discussion_r1409830602
##########
cpp/src/arrow/filesystem/azurefs.cc:
##########
@@ -1017,69 +1089,67 @@ class AzureFileSystem::Impl {
exception);
}
} else {
- auto container_client =
- blob_service_client_->GetBlobContainerClient(location.container);
- Azure::Storage::Blobs::ListBlobsOptions options;
- options.Prefix = internal::EnsureTrailingSlash(location.path);
- //
https://learn.microsoft.com/en-us/rest/api/storageservices/blob-batch#remarks
- //
- // Only supports up to 256 subrequests in a single batch. The
- // size of the body for a batch request can't exceed 4 MB.
- const int32_t kNumMaxRequestsInBatch = 256;
- options.PageSizeHint = kNumMaxRequestsInBatch;
+ return DeleteDirContentsWihtoutHierarchicalNamespace(location, true);
+ }
+ }
+
+ Status DeleteDirContents(const AzureLocation& location, bool missing_dir_ok)
{
+ if (location.container.empty()) {
+ return internal::InvalidDeleteDirContents(location.all);
+ }
+ if (location.path.empty()) {
+ return internal::InvalidDeleteDirContents(location.all);
Review Comment:
> I think when comparing azure to s3, the Azure storage account is analogous
to the S3 bucket and the Azure container is an extra level that S3 doesn't
have. I think 1 doesn't really reference any storage on S3.
Azure Containers are S3 Buckets. Azure Blob Names are S3 keys. `s3fs` has an
option [1] that forbids/allows creation of new buckets for when the user asks
for the creation of a `/newbucket` directory [2].
[1]
https://github.com/apache/arrow/blob/main/cpp/src/arrow/filesystem/s3fs.cc#L1820
[2]
https://github.com/apache/arrow/blob/main/cpp/src/arrow/filesystem/s3fs.cc#L2672
--
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]