adoroszlai commented on code in PR #3277:
URL: https://github.com/apache/ozone/pull/3277#discussion_r843822285
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java:
##########
@@ -338,8 +338,8 @@ public OmKeyInfo lookupKey(OmKeyArgs args, String
clientAddress)
bucketName);
BucketLayout bucketLayout =
- getBucketLayout(metadataManager, args.getVolumeName(),
- args.getBucketName());
+ OzoneManagerUtils.getBucketLayout(args.getVolumeName(),
+ args.getBucketName(), ozoneManager, new HashSet<>());
Review Comment:
I have minor code suggestions for this refactoring:
1. Create another `getBucketLayout` method (in `OzoneManagerUtils`) without
the `Set<Pair<String, String>> visited` parameter, passing `new HashSet<>()` to
the existing `getBucketLayout` method.
2. Make `OzoneManager` the first param of this new method.
3. Add static import for `OzoneManagerUtils.getBucketLayout`.
This would make the code more readable and minimize the changes necessary to
satisfy line width rules.
--
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]