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

Reply via email to