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

Method CreateMultipartUpload

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

Source from the content-addressed store, hash-verified

1648 }
1649
1650 Status CreateMultipartUpload() {
1651 DCHECK(ShouldBeMultipartUpload());
1652
1653 ARROW_ASSIGN_OR_RAISE(auto client_lock, holder_->Lock());
1654
1655 // Initiate the multi-part upload
1656 S3Model::CreateMultipartUploadRequest req;
1657 req.SetBucket(ToAwsString(path_.bucket));
1658 req.SetKey(ToAwsString(path_.key));
1659 RETURN_NOT_OK(SetSSECustomerKey(&req, sse_customer_key_));
1660 RETURN_NOT_OK(SetMetadataInRequest(&req));
1661
1662 auto outcome = client_lock.Move()->CreateMultipartUpload(req);
1663 if (!outcome.IsSuccess()) {
1664 return ErrorToStatus(
1665 std::forward_as_tuple("When initiating multiple part upload for key '",
1666 path_.key, "' in bucket '", path_.bucket, "': "),
1667 "CreateMultipartUpload", outcome.GetError());
1668 }
1669 multipart_upload_id_ = outcome.GetResult().GetUploadId();
1670
1671 return Status::OK();
1672 }
1673
1674 Status Init() {
1675 // 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