smengcl commented on code in PR #8450:
URL: https://github.com/apache/ozone/pull/8450#discussion_r2102735912
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/PendingKeysDeletion.java:
##########
@@ -17,26 +17,34 @@
package org.apache.hadoop.ozone.om;
-import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import org.apache.hadoop.ozone.common.BlockGroup;
import org.apache.hadoop.ozone.om.helpers.RepeatedOmKeyInfo;
/**
- * Return class for OMMetadataManager#getPendingDeletionKeys.
+ * Tracks metadata for keys pending deletion and their associated blocks.
+ *
+ * This class maintains:
+ * <ul>
+ * <li>A list of {@link BlockGroup} entries, where each entry contains
+ * a key name and its associated block IDs</li>
+ * <li>A key-value mapping that requires updating after the remaining
+ * blocks are purged</li>
+ * </ul>
*/
public class PendingKeysDeletion {
- private HashMap<String, RepeatedOmKeyInfo> keysToModify;
+ private Map<String, RepeatedOmKeyInfo> keysToModify;
private List<BlockGroup> keyBlocksList;
public PendingKeysDeletion(List<BlockGroup> keyBlocksList,
- HashMap<String, RepeatedOmKeyInfo> keysToModify) {
+ Map<String, RepeatedOmKeyInfo> keysToModify) {
this.keysToModify = keysToModify;
this.keyBlocksList = keyBlocksList;
}
- public HashMap<String, RepeatedOmKeyInfo> getKeysToModify() {
+ public Map<String, RepeatedOmKeyInfo> getKeysToModify() {
Review Comment:
Every time I see such public interface / methods changes like this I am
thinking we should adopt `@InterfaceAudience` annotation more. Like putting
this before this class as well:
https://github.com/apache/ozone/blob/dc9952e446940b82b277a7e8c9d02239a8417a06/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/security/ssl/ReloadingX509KeyManager.java#L48-L50
This informs the user of this API that this is meant to be used internally
by Ozone only and we are not responsible for any breakage to the application as
a result of API evolvements in this class.
--
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]