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

Method CreateMultipartUpload

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

Source from the content-addressed store, hash-verified

1707 }
1708
1709 Status CreateMultipartUpload() {
1710 DCHECK(ShouldBeMultipartUpload());
1711
1712 ARROW_ASSIGN_OR_RAISE(auto client_lock, holder_->Lock());
1713
1714 // Initiate the multi-part upload
1715 S3Model::CreateMultipartUploadRequest req;
1716 req.SetBucket(ToAwsString(path_.bucket));
1717 req.SetKey(ToAwsString(path_.key));
1718 RETURN_NOT_OK(SetSSECustomerKey(&req, sse_customer_key_));
1719 RETURN_NOT_OK(SetMetadataInRequest(&req));
1720
1721 auto outcome = client_lock.Move()->CreateMultipartUpload(req);
1722 if (!outcome.IsSuccess()) {
1723 return ErrorToStatus(
1724 std::forward_as_tuple("When initiating multiple part upload for key '",
1725 path_.key, "' in bucket '", path_.bucket, "': "),
1726 "CreateMultipartUpload", outcome.GetError());
1727 }
1728 multipart_upload_id_ = outcome.GetResult().GetUploadId();
1729
1730 return Status::OK();
1731 }
1732
1733 Status Init() {
1734 // 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