juncevich commented on code in PR #7558:
URL: https://github.com/apache/ozone/pull/7558#discussion_r1883651197
##########
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:
@ivandika3 I'm not sure that I fully understood your advice. Logic must
moved to the server side. The second variant is not acceptable. Do you offer to
create a new method with server-side filtering? Also, need to create the same
request/response model but with a different name? I suspect that the reason is
backward compatibility. But does current realization break something? Is it
possible, when the client was updated and the server-side part was not?
--
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]