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/26 03:44:42 UTC

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

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


##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/ObjectEndpoint.java:
##########
@@ -132,6 +138,8 @@ public class ObjectEndpoint extends EndpointBase {
 
   private List<String> customizableGetHeaders = new ArrayList<>();
   private int bufferSize;
+  private int chunkSize;
+  private boolean datastreamEnabled;

Review Comment:
   Please make the new fields final.



##########
hadoop-ozone/s3gateway/src/test/java/org/apache/hadoop/ozone/client/OzoneBucketStub.java:
##########
@@ -273,14 +371,14 @@ public OmMultipartUploadCompleteInfo completeMultipartUpload(String key,
       ByteArrayOutputStream output = new ByteArrayOutputStream();
 
       int prevPartNumber = 0;
-      for (Map.Entry<Integer, String> part: partsMap.entrySet()) {
+      for (Map.Entry<Integer, String> part : partsMap.entrySet()) {

Review Comment:
   Please don't have whitespace change like this.  Since this is an existing file in the master branch, it will make the merge harder.



##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/ObjectEndpoint.java:
##########
@@ -185,11 +200,20 @@ 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);
 
+      if ((replicationConfig != null &&
+              replicationConfig.getReplicationType()  == EC) ||
+          bucket.getReplicationConfig() instanceof ECReplicationConfig) {
+        datastreamEnabled = false;

Review Comment:
   Please add a local variable.  Otherwise, it will affect other calls.



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