[
https://issues.apache.org/jira/browse/HDDS-1942?focusedWorklogId=298541&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-298541
]
ASF GitHub Bot logged work on HDDS-1942:
----------------------------------------
Author: ASF GitHub Bot
Created on: 21/Aug/19 09:21
Start Date: 21/Aug/19 09:21
Worklog Time Spent: 10m
Work Description: elek commented on pull request #1279: HDDS-1942.
Support copy during S3 multipart upload part creation
URL: https://github.com/apache/hadoop/pull/1279#discussion_r316082174
##########
File path:
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/ObjectEndpoint.java
##########
@@ -736,4 +761,25 @@ private CopyObjectResponse copyObject(String copyHeader,
}
}
}
+
+ /**
+ * Parse the key and bucket name from copy header.
+ */
+ private Pair<String, String> parseSourceHeader(String copyHeader)
+ throws OS3Exception {
+ String header = copyHeader;
+ if (header.startsWith("/")) {
+ header = copyHeader.substring(1);
+ }
+ int pos = header.indexOf("/");
+ if (pos == -1) {
+ OS3Exception ex = S3ErrorTable.newError(S3ErrorTable
+ .INVALID_ARGUMENT, header);
+ ex.setErrorMessage("Copy Source must mention the source bucket and " +
+ "key: sourcebucket/sourcekey");
+ throw ex;
+ }
+
+ return Pair.of(copyHeader.substring(0, pos), copyHeader.substring(pos +
1));
Review comment:
Thanks, you are right. I fixed it and created a unit test for this utility
method.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 298541)
Time Spent: 1h 50m (was: 1h 40m)
> Support copy during S3 multipart upload part creation
> -----------------------------------------------------
>
> Key: HDDS-1942
> URL: https://issues.apache.org/jira/browse/HDDS-1942
> Project: Hadoop Distributed Data Store
> Issue Type: Sub-task
> Components: S3
> Reporter: Elek, Marton
> Assignee: Elek, Marton
> Priority: Blocker
> Labels: pull-request-available
> Time Spent: 1h 50m
> Remaining Estimate: 0h
>
> Uploads a part by copying data from an existing object as data source
> Documented here:
> https://docs.aws.amazon.com/AmazonS3/latest/API/mpUploadUploadPartCopy.html
--
This message was sent by Atlassian Jira
(v8.3.2#803003)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]