spacemonkd commented on code in PR #10588:
URL: https://github.com/apache/ozone/pull/10588#discussion_r3534493869


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/s3/multipart/S3MultipartUploadCommitPartRequest.java:
##########
@@ -370,6 +420,25 @@ private String getMultipartKey(String volumeName, String 
bucketName,
         keyName, uploadID);
   }
 
+  private OmMultipartPartKey getMultipartPartKey(String uploadId,
+      int partNumber) {
+    return OmMultipartPartKey.of(uploadId, partNumber);
+  }
+
+  private void validateSplitPartInfo(OmKeyInfo omKeyInfo, int partNumber)
+      throws OMException {
+    if (StringUtils.isBlank(omKeyInfo.getMetadata().get(OzoneConsts.ETAG))) {
+      throw new OMException("Missing ETag for multipart upload part "
+          + partNumber, OMException.ResultCodes.INVALID_REQUEST);
+    }
+    if (omKeyInfo.getKeyLocationVersions() == null
+        || omKeyInfo.getKeyLocationVersions().isEmpty()
+        || omKeyInfo.getLatestVersionLocations().getLocationList().isEmpty()) {
+      throw new OMException("Missing block locations for multipart upload part 
"
+          + partNumber, OMException.ResultCodes.INVALID_REQUEST);
+    }
+  }

Review Comment:
   Yes, I reverted the extra check, however we still keep the ETag check as 
that is required.



##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/s3/multipart/S3MultipartUploadCommitPartRequest.java:
##########
@@ -370,6 +420,25 @@ private String getMultipartKey(String volumeName, String 
bucketName,
         keyName, uploadID);
   }
 
+  private OmMultipartPartKey getMultipartPartKey(String uploadId,
+      int partNumber) {
+    return OmMultipartPartKey.of(uploadId, partNumber);
+  }

Review Comment:
   Addressed in the latest commit.



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