-
Notifications
You must be signed in to change notification settings - Fork 594
HDDS-12887. Added Deletion Progress metrics to OM Web UI. #8655
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Unable to open the screenshot. |
| <th>Reclaimed Size</th> | ||
| <th>#Reclaimed Keys</th> | ||
| <th>#Iterated Keys</th> | ||
| <th>#NotReclaimable Keys</th> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NotReclaimable keys makes sense in context of snapshots. We could change it to
| <th>#NotReclaimable Keys</th> | |
| <th>#NotReclaimable Keys (Referred by snapshots)</th> |
|
This PR might need to be merged after #8677 |
|
Will merge #8677 today to unblock this one. |
648bc9e to
9ef29dd
Compare
…mtrics and KDS service status.
9ef29dd to
3f26660
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a "Deletion Progress" section to the OM Web UI to provide visibility into the Key Deleting Service progress, displaying cumulative deletion metrics for the last 24 hours along with service status and run information.
Key changes include:
- Added comprehensive deletion metrics tracking for both Active Object Store (AOS) and snapshot operations
- Enhanced the OM Web UI with a new deletion progress section showing metrics and service status
- Extended the Key Deleting Service to track and report detailed deletion statistics
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| TestKeyDeletingService.java | Added unit tests for deletion metrics and updated existing test methods |
| ozoneManager.js | Added utility functions for data formatting and JMX query for DeletingServiceMetrics |
| om-overview.html | Added new UI section displaying deletion progress metrics and service status |
| KeyDeletingService.java | Enhanced to track deletion statistics and update metrics after task completion |
| PendingKeysDeletion.java | Extended to include key block replicated size and not reclaimable key count |
| KeyManagerImpl.java | Updated to populate additional metrics data for pending deletions |
| DeletingServiceMetrics.java | Added new metrics for 24-hour intervals, service state, and last run statistics |
| BackgroundService.java | Added task completion callback to support metrics updates |
Comments suppressed due to low confidence (1)
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/service/TestKeyDeletingService.java:825
- The test is passing null for the keyBlockReplicatedSize parameter which means the deletion size metrics won't be properly tested. Consider providing a mock map to verify size tracking functionality.
keyDeletingService.processKeyDeletes(blockGroups, keysToModify, renameEntriesToBeDeleted, null, null, null);
| // Add JMX query to fetch DeletingServiceMetrics data | ||
| $http.get("jmx?qry=Hadoop:service=OzoneManager,name=DeletingServiceMetrics") | ||
| .then(function (result) { | ||
| if (result.data.beans && result.data.beans.length > 0) { |
Copilot
AI
Jul 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing closing brace for the function that contains this if statement. The function appears to be incomplete and will cause a syntax error.
...ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/KeyDeletingService.java
Show resolved
Hide resolved
| this.kdsCurRunTimestamp.set(timestamp); | ||
| } | ||
|
|
||
| private void resetMetrics() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why reset metrics after 24hours? usually metrics are reset when restart, and that's good enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already collect deletion metrics since OM uptime. The thought was on OM UI it showing the progress of deletion over the last 24h would be more interesting for someone who has performed a delete and wants to track how the delete is proceeding.
jojochuang
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had a quick look and I think this is ready to go.
| aosDeletionStats.updateDeletionStats(purgeResult.getKey().getKey(), purgeResult.getKey().getValue(), | ||
| keyBlocksList.size() + pendingKeysDeletion.getNotReclaimableKeyCount(), | ||
| pendingKeysDeletion.getNotReclaimableKeyCount()); | ||
| } else { | ||
| snapshotDeletionStats.updateDeletionStats(purgeResult.getKey().getKey(), purgeResult.getKey().getValue(), | ||
| keyBlocksList.size() + pendingKeysDeletion.getNotReclaimableKeyCount(), | ||
| pendingKeysDeletion.getNotReclaimableKeyCount()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems these two cases are almost exactly the same except the object itself is aosDeletionStats or snapshotDeletionStats. A refactoring is recommended though not required.
hadoop-ozone/ozone-manager/src/main/resources/webapps/ozoneManager/ozoneManager.js
Outdated
Show resolved
Hide resolved
jojochuang
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
loos good to me.
This PR should ideally split into two parts due to its complexity: metric implementation, and frontend code.
Will merge later.
…ager/ozoneManager.js
|
Thanks @SaketaChalamchala ! |
…apache#8655) Co-authored-by: Wei-Chiu Chuang <jojochuang@gmail.com> (cherry picked from commit 37589a4) Conflicts: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/DeletingServiceMetrics.java hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/KeyDeletingService.java hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/service/TestKeyDeletingService.java Change-Id: Ic874a0bb516712100b5bc5a584a2a4a54858d1da
What changes were proposed in this pull request?
To provide visibility into the Key Deleting Service progress, added a "Deletion Progress" section to the OM Web UI displaying the cumulative deletion progress (no. of keys and size) in the last 1 day as well as the KDS service status, Last run details and the next run information.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-12887
How was this patch tested?
Unit Tests for metrics
