You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "hemantk-12 (via GitHub)" <gi...@apache.org> on 2023/08/25 18:20:59 UTC

[GitHub] [ozone] hemantk-12 commented on a diff in pull request #5210: HDDS-9201. [Ozone-Streaming] Stream copy object support on gateway

hemantk-12 commented on code in PR #5210:
URL: https://github.com/apache/ozone/pull/5210#discussion_r1305998130


##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/ObjectEndpoint.java:
##########
@@ -1004,11 +1005,20 @@ void copy(OzoneVolume volume, InputStream src, long srcKeyLen,
       ReplicationConfig replication,
             Map<String, String> metadata) throws IOException {
     long copyLength;
-    try (OzoneOutputStream dest =
-                 getClientProtocol().createKey(
-        volume.getName(), destBucket, destKey, srcKeyLen,
-        replication, metadata)) {
-      copyLength = IOUtils.copyLarge(src, dest);
+    if (datastreamEnabled && !((replication != null &&

Review Comment:
   ```suggestion
       if (datastreamEnabled && !(replication != null &&
           replication.getReplicationType() == EC) &&
           srcKeyLen > datastreamMinLength) {
   ```
   
   Please remove redundant parentheses.



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org