| 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 |
nothing calls this directly
no test coverage detected