You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/06/30 10:04:51 UTC

[GitHub] [ozone] captainzmc commented on a diff in pull request #2858: HDDS-5869. [Ozone-Streaming] Added support for stream on S3Gateway wr…

captainzmc commented on code in PR #2858:
URL: https://github.com/apache/ozone/pull/2858#discussion_r910844818


##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/ObjectEndpoint.java:
##########
@@ -185,11 +200,21 @@ public Response put(
       storageType = headers.getHeaderString(STORAGE_CLASS_HEADER);
       boolean storageTypeDefault = StringUtils.isEmpty(storageType);
 
+      if (storageTypeDefault) {
+        storageType = S3StorageType.getDefault(ozoneConfiguration).toString();
+      }
+
       // Normal put object
       OzoneBucket bucket = getBucket(bucketName);
       ReplicationConfig replicationConfig =
           getReplicationConfig(bucket, storageType);
 
+      boolean enableEC = false;
+      if ((replicationConfig != null &&
+              replicationConfig.getReplicationType() == EC) ||
+          bucket.getReplicationConfig() instanceof ECReplicationConfig) {
+        enableEC = true;
+      }

Review Comment:
   Hi @szetszwo , I think we'd better add a separate switch for S3G like [we did for OFS/O3FS](https://github.com/apache/ozone/commit/657915b506fcb115d938c2768317fca1c46980a3#diff-be3f3d437f04fee467f63cf0e71a7a403ebd5df8c633043d8646622bbfe20c82R103). Instead of using DFS_CONTAINER_RATIS_DATASTREAM_ENABLE to control both S3G and HDDS.  This allows both client and HDDS to have a switch that controls whether or not streaming is used.
   Otherwise, it cannot meet the requirements of ofs/o3fs using Streaming and S3 using Async.



-- 
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