ivandika3 commented on code in PR #7817:
URL: https://github.com/apache/ozone/pull/7817#discussion_r1960893345


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java:
##########
@@ -820,19 +821,19 @@ public boolean isSstFilteringSvcEnabled() {
   
   @Override
   public OmMultipartUploadList listMultipartUploads(String volumeName,
-      String bucketName, String prefix) throws OMException {
+      String bucketName, String prefix, String keyMarker, String 
uploadIdMarker, int maxUploads) throws OMException {
     Preconditions.checkNotNull(volumeName);
     Preconditions.checkNotNull(bucketName);
 
     metadataManager.getLock().acquireReadLock(BUCKET_LOCK, volumeName,
         bucketName);
     try {
 
-      Set<String> multipartUploadKeys =
+      MultipartUploadKeys multipartUploadKeys =

Review Comment:
   @peterxcli From the latest change, seems the multipartInfoTable will still 
be scanned twice. Could you raise a follow-up ticket if you want to address 
this issue in another task?



##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/s3/awssdk/v1/AbstractS3SDKV1Tests.java:
##########
@@ -663,33 +666,93 @@ public void testLowLevelMultipartUpload(@TempDir Path 
tempDir) throws Exception
   @Test
   public void testListMultipartUploads() {
     final String bucketName = getBucketName();
-    final String multipartKey1 = getKeyName("multipart1");
-    final String multipartKey2 = getKeyName("multipart2");
+    final String multipartKeyPrefix = getKeyName("multipart");
 
     s3Client.createBucket(bucketName);
 
-    List<String> uploadIds = new ArrayList<>();
+    // Create 25 multipart uploads to test pagination
+    List<String> allKeys = new ArrayList<>();
+    Map<String, String> keyToUploadId = new HashMap<>();
 
-    String uploadId1 = initiateMultipartUpload(bucketName, multipartKey1, 
null, null, null);
-    uploadIds.add(uploadId1);
-    String uploadId2 = initiateMultipartUpload(bucketName, multipartKey1, 
null, null, null);
-    uploadIds.add(uploadId2);
-    // TODO: Currently, Ozone sorts based on uploadId instead of MPU init time 
within the same key.
-    //  Remove this sorting step once HDDS-11532 has been implemented

Review Comment:
   Let's not remove this comment for `Collections#sort` until HDDS-11532 has 
been implemented.



##########
hadoop-ozone/interface-client/src/main/proto/OmClientProtocol.proto:
##########
@@ -1762,6 +1762,7 @@ message ListMultipartUploadsRequest {
     optional string keyMarker = 4;
     optional string uploadIdMarker = 5;
     optional int32 maxUploads = 6;
+    optional bool noPagination = 7; // for backward compatibility

Review Comment:
   I think this should be `withPagination` since the old S3G will not set this 
`noPagination` and the default protobuf value will be false.



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