MCPcopy Create free account
hub / github.com/apache/arrow / operator()

Method operator()

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

Source from the content-addressed store, hash-verified

2800 std::string bucket;
2801
2802 Status operator()(const S3Model::DeleteObjectsOutcome& outcome) const {
2803 if (!outcome.IsSuccess()) {
2804 return ErrorToStatus("DeleteObjects", outcome.GetError());
2805 }
2806 // Also need to check per-key errors, even on successful outcome
2807 // See
2808 // https://docs.aws.amazon.com/fr_fr/AmazonS3/latest/API/multiobjectdeleteapi.html
2809 const auto& errors = outcome.GetResult().GetErrors();
2810 if (!errors.empty()) {
2811 std::stringstream ss;
2812 ss << "Got the following " << errors.size()
2813 << " errors when deleting objects in S3 bucket '" << bucket << "':\n";
2814 for (const auto& error : errors) {
2815 ss << "- key '" << error.GetKey() << "': " << error.GetMessage() << "\n";
2816 }
2817 return Status::IOError(ss.str());
2818 }
2819 return Status::OK();
2820 }
2821 };
2822
2823 const auto chunk_size = static_cast<size_t>(kMultipleDeleteMaxKeys);

Callers

nothing calls this directly

Calls 8

ErrorToStatusFunction · 0.85
IOErrorFunction · 0.85
strMethod · 0.80
OKFunction · 0.50
GetResultMethod · 0.45
emptyMethod · 0.45
sizeMethod · 0.45
GetKeyMethod · 0.45

Tested by

no test coverage detected