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

Method CreateMultipartUpload

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

Source from the content-addressed store, hash-verified

1709 }
1710
1711 Status CreateMultipartUpload() {
1712 DCHECK(ShouldBeMultipartUpload());
1713
1714 ARROW_ASSIGN_OR_RAISE(auto client_lock, holder_->Lock());
1715
1716 // Initiate the multi-part upload
1717 S3Model::CreateMultipartUploadRequest req;
1718 req.SetBucket(ToAwsString(path_.bucket));
1719 req.SetKey(ToAwsString(path_.key));
1720 RETURN_NOT_OK(SetSSECustomerKey(&req, sse_customer_key_));
1721 RETURN_NOT_OK(SetMetadataInRequest(&req));
1722
1723 auto outcome = client_lock.Move()->CreateMultipartUpload(req);
1724 if (!outcome.IsSuccess()) {
1725 return ErrorToStatus(
1726 std::forward_as_tuple("When initiating multiple part upload for key '",
1727 path_.key, "' in bucket '", path_.bucket, "': "),
1728 "CreateMultipartUpload", outcome.GetError());
1729 }
1730 multipart_upload_id_ = outcome.GetResult().GetUploadId();
1731
1732 return Status::OK();
1733 }
1734
1735 Status Init() {
1736 // If we are allowed to do delayed I/O, we can use a single request to upload the

Callers

nothing calls this directly

Calls 6

ToAwsStringFunction · 0.85
SetSSECustomerKeyFunction · 0.85
ErrorToStatusFunction · 0.85
OKFunction · 0.50
MoveMethod · 0.45
GetResultMethod · 0.45

Tested by

no test coverage detected