xichen01 commented on code in PR #5524:
URL: https://github.com/apache/ozone/pull/5524#discussion_r1378539085
##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/ObjectEndpoint.java:
##########
@@ -882,6 +888,20 @@ private Response createMultipartKey(OzoneVolume volume,
String bucket,
.createMultipartKey(ozoneBucket, key, length, partNumber,
uploadID, chunkSize, (DigestInputStream) body);
}
+
+ copyHeader = headers.getHeaderString(COPY_SOURCE_HEADER);
+ if (copyHeader != null) {
+ String range =
Review Comment:
Ozone does not currently support copy ranges for non-MPU keys so Ozone will
copy the entire key regardless of the value of `COPY_SOURCE_HEADER_RANGE`.
Maybe we can add this when we need to support copy ranges.
##########
hadoop-ozone/s3gateway/src/test/java/org/apache/hadoop/ozone/s3/endpoint/TestPartUpload.java:
##########
@@ -135,4 +141,70 @@ public void testPartUploadWithIncorrectUploadID() throws
Exception {
assertEquals(HTTP_NOT_FOUND, ex.getHttpCode());
}
}
+
+ @Test
+ public void testPartUploadStreamContentLength()
+ throws IOException, OS3Exception {
+ HttpHeaders headers = Mockito.mock(HttpHeaders.class);
+ ObjectEndpoint objectEndpoint = new ObjectEndpoint();
+ objectEndpoint.setHeaders(headers);
+ objectEndpoint.setClient(client);
+ objectEndpoint.setOzoneConfiguration(new OzoneConfiguration());
+ objectEndpoint.setHeaders(headers);
+ String keyName = UUID.randomUUID().toString();
+
+ String chunkedContent = "0a;chunk-signature=signature\r\n"
Review Comment:
The length of `"1234567890" + "abcde"` is 15, `05;chunk-signature=signature`
is some metadata.
I referenced it here:
https://github.com/apache/ozone/blob/45aa6c1f1c21be86c63f134d94e50a156068603e/hadoop-ozone/s3gateway/src/test/java/org/apache/hadoop/ozone/s3/endpoint/TestObjectPut.java#L168-L169
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]