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


##########
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rpc/RpcClient.java:
##########
@@ -1765,16 +1765,7 @@ public OzoneKeyDetails getS3KeyDetails(String 
bucketName, String keyName)
   @Override
   public OzoneKeyDetails getS3KeyDetails(String bucketName, String keyName,
                                          int partNumber) throws IOException {
-    OmKeyInfo keyInfo = getS3KeyInfo(bucketName, keyName, false);
-    List<OmKeyLocationInfo> filteredKeyLocationInfo = keyInfo
-        .getLatestVersionLocations().getBlocksLatestVersionOnly().stream()
-        .filter(omKeyLocationInfo -> omKeyLocationInfo.getPartNumber() ==
-            partNumber)
-        .collect(Collectors.toList());
-    keyInfo.updateLocationInfoList(filteredKeyLocationInfo, false);
-    keyInfo.setDataSize(filteredKeyLocationInfo.stream()
-        .mapToLong(OmKeyLocationInfo::getLength)
-        .sum());
+    OmKeyInfo keyInfo = getS3PartKeyInfo(bucketName, keyName, partNumber);
     return getOzoneKeyDetails(keyInfo);

Review Comment:
   Thanks for your explanation. Now it is absolutely clear.



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