Copilot commented on code in PR #9102:
URL: https://github.com/apache/ozone/pull/9102#discussion_r2409362021
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMDirectoriesPurgeRequestWithFSO.java:
##########
@@ -254,6 +237,47 @@ public OMClientResponse
validateAndUpdateCache(OzoneManager ozoneManager, Execut
getBucketLayout(), volBucketInfoMap, fromSnapshotInfo, openKeyInfoMap);
}
+ /**
+ * Helper class to hold processed key information.
+ */
+ private static class ProcessedKeyInfo {
+ private final OmKeyInfo keyInfo;
+ private final String deleteKey;
+ private final String volumeName;
+ private final String bucketName;
+ private final Pair<String, String> volBucketPair;
Review Comment:
The ProcessedKeyInfo class exposes all fields as package-private, but they
should be private with getter methods for better encapsulation. Direct field
access breaks encapsulation principles.
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMDirectoriesPurgeRequestWithFSO.java:
##########
@@ -254,6 +237,47 @@ public OMClientResponse
validateAndUpdateCache(OzoneManager ozoneManager, Execut
getBucketLayout(), volBucketInfoMap, fromSnapshotInfo, openKeyInfoMap);
}
+ /**
+ * Helper class to hold processed key information.
+ */
+ private static class ProcessedKeyInfo {
+ private final OmKeyInfo keyInfo;
+ private final String deleteKey;
+ private final String volumeName;
+ private final String bucketName;
+ private final Pair<String, String> volBucketPair;
+
+ ProcessedKeyInfo(OmKeyInfo keyInfo, String deleteKey, String volumeName,
String bucketName,
+ Pair<String, String> volBucketPair) {
Review Comment:
The constructor accepts both individual volumeName/bucketName parameters and
a volBucketPair containing the same information, creating redundancy. Consider
creating the volBucketPair internally from volumeName and bucketName to
eliminate this duplication.
--
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]