xichen01 commented on code in PR #9403:
URL: https://github.com/apache/ozone/pull/9403#discussion_r2581824463
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMMetrics.java:
##########
@@ -799,11 +804,42 @@ public void incNumKeyDeleteFails() {
numKeyDeleteFails.incr();
}
+ public void incNumKeyDeleteFails(int count) {
+ numKeyDeleteFails.incr(count);
+ }
+
+ public void incNumKeyRetentionDeleteFails(int count) {
+ numKeyRetentionDeleteFails.incr(count);
+ }
+
+ public void incNumKeyTrashDeleteFails(int count) {
+ numKeyTrashDeleteFails.incr(count);
+ }
+
public void incNumKeyDeletes() {
numKeyOps.incr();
numKeyDeletes.incr();
}
+ public void incNumKeyDeletesWithoutOps() {
+ numKeyDeletes.incr();
Review Comment:
The current deletion Metrics did not distinguish Key, File, and Directory,
which might require additional changes. My modifications here are just to fix a
metrics issue; otherwise, the test cases would fail.
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMMetrics.java:
##########
@@ -120,6 +122,8 @@ public class OMMetrics implements OmMetadataReaderMetrics {
private @Metric MutableCounterLong numKeyLookupFails;
private @Metric MutableCounterLong numKeyRenameFails;
private @Metric MutableCounterLong numKeyDeleteFails;
+ private @Metric MutableCounterLong numKeyRetentionDeleteFails;
Review Comment:
updated.
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/TrashPolicyOzone.java:
##########
@@ -171,8 +171,7 @@ public void run() {
continue;
}
TrashPolicyOzone trash = new TrashPolicyOzone(fs, conf, om);
- Path trashRootPath = trashRoot.getPath();
- Runnable task = getEmptierTask(trashRootPath, trash, false);
+ Runnable task = getEmptierTask(trashRoot.getPath(), trash,
false);
Review Comment:
reverted.
##########
hadoop-ozone/interface-client/src/main/proto/OmClientProtocol.proto:
##########
@@ -1365,6 +1365,13 @@ message DeleteKeyRequest {
message DeleteKeysRequest {
optional DeleteKeyArgs deleteKeys = 1;
+ optional RequestSource sourceType = 2 [default = USER];
+}
+
+enum RequestSource {
+ USER = 1;
+ RETENTION = 2;
Review Comment:
updated.
--
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]