juncevich commented on code in PR #7558:
URL: https://github.com/apache/ozone/pull/7558#discussion_r1883609373


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java:
##########
@@ -509,6 +509,27 @@ private OmKeyInfo readKeyInfo(OmKeyArgs args, BucketLayout 
bucketLayout)
     if (args.getLatestVersionLocation()) {
       slimLocationVersion(value);
     }
+    Integer partNumberParam = args.getPartNumber();
+    if (partNumberParam != null && partNumberParam > 0) {
+      OmKeyLocationInfoGroup latestLocationVersion = 
value.getLatestVersionLocations();
+      if (latestLocationVersion != null && 
latestLocationVersion.isMultipartKey()) {
+
+        value.setKeyLocationVersions(
+            Collections.singletonList(
+                new OmKeyLocationInfoGroup(
+                    latestLocationVersion.getVersion(),
+                    value.getCurrentlocationsPartsMap()
+                        .getOrDefault(partNumberParam, 
Collections.emptyList()),
+                    true
+                )
+            )
+        );
+        value.setDataSize(
+            value.getCurrentDataSizePartsMap()
+                .getOrDefault(partNumberParam, 0L)
+        );
+      }
+    }

Review Comment:
   Main logic moved to this place



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