guohao-rosicky commented on code in PR #5162:
URL: https://github.com/apache/ozone/pull/5162#discussion_r1293313806
##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/ObjectEndpoint.java:
##########
@@ -262,6 +268,12 @@ public Response put(
body = new SignedChunksInputStream(body);
}
long putLength = 0;
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ IOUtils.copyLarge(body, baos);
+ body = new ByteArrayInputStream(baos.toByteArray());
Review Comment:
If the file is very large, this byte array will be very large, it is
recommended to change to a wrapped stream in which the md5 is calculated using
streaming.
--
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]