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: [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]