ArafatKhan2198 commented on code in PR #4182:
URL: https://github.com/apache/ozone/pull/4182#discussion_r1082291351
##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/ContainerEndpoint.java:
##########
@@ -160,8 +160,19 @@ public Response getKeysForContainer(
// Directly calling get() on the Key table instead of iterating since
// only full keys are supported now. When we change to using a prefix
// of the key, this needs to change to prefix seek.
- OmKeyInfo omKeyInfo = omMetadataManager.getKeyTable(getBucketLayout())
- .getSkipCache(containerKeyPrefix.getKeyPrefix());
+ // The first expression will try to get the OmKeyInfo object by calling
+ // getSkipCache on the BucketLayout.LEGACY table, passing in the
+ // keyPrefix as the key. If this expression returns null, meaning
+ // the key was not found in the LEGACY table, the second expression
+ // will be evaluated and the OmKeyInfo will be obtained from the
+ // BucketLayout.FILE_SYSTEM_OPTIMIZED table.
Review Comment:
Thanks for the review. I have trimmed down the comment !!
--
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]