You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "jojochuang (via GitHub)" <gi...@apache.org> on 2025/05/12 17:33:18 UTC
[PR] HDDS-13013. [Snapshot] Add metrics and tests for snapshot operations. [ozone]
jojochuang opened a new pull request, #8436:
URL: https://github.com/apache/ozone/pull/8436
## What changes were proposed in this pull request?
HDDS-13013. [Snapshot] Add metrics and tests for snapshot operations.
Please describe your PR in detail:
* Add metrics counter for renameSnapshot, cancelSnapshotDiff, listSnapshotDiffJobs requests.
* update the counters in the respective request handlers.
* Tests to ensure the counters are updated correctly after each operation: including listSnapshotDiffJobs, cancelSnapshotDiff, getSnapshotInfo, renameSnapshot, deleteSnapshot
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-13013
(Please replace this section with the link to the Apache JIRA)
## How was this patch tested?
New unit tests TestOmMetrics#testSnapshotOps()
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13013. [Snapshot] Add metrics and tests for snapshot operations. [ozone]
Posted by "SaketaChalamchala (via GitHub)" <gi...@apache.org>.
SaketaChalamchala commented on code in PR #8436:
URL: https://github.com/apache/ozone/pull/8436#discussion_r2130220831
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMMetrics.java:
##########
@@ -71,10 +71,13 @@ public class OMMetrics implements OmMetadataReaderMetrics {
private @Metric MutableCounterLong numSnapshotCreates;
private @Metric MutableCounterLong numSnapshotDeletes;
private @Metric MutableCounterLong numSnapshotLists;
+ private @Metric MutableCounterLong numSnapshotRenames;
private @Metric MutableCounterLong numSnapshotDiffJobs;
private @Metric MutableCounterLong numSnapshotInfos;
private @Metric MutableCounterLong numSnapshotPurges;
private @Metric MutableCounterLong numSnapshotSetProperties;
+ private @Metric MutableCounterLong numCancelSnapshotDiffs;
+ private @Metric MutableCounterLong numListSnapshotDiffJobs;
Review Comment:
Thanks for the patch @jojochuang. Can you also add metrics to track [OMSnapshotMoveTableKeysRequest.java](https://github.com/apache/ozone/blob/master/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/snapshot/OMSnapshotMoveTableKeysRequest.java) and [OMSnapshotMoveDeletedKeysRequest.java](https://github.com/apache/ozone/blob/master/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/snapshot/OMSnapshotMoveDeletedKeysRequest.java)?
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13013. [Snapshot] Add metrics and tests for snapshot operations. [ozone]
Posted by "jojochuang (via GitHub)" <gi...@apache.org>.
jojochuang commented on code in PR #8436:
URL: https://github.com/apache/ozone/pull/8436#discussion_r2130995496
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMMetrics.java:
##########
@@ -71,10 +71,13 @@ public class OMMetrics implements OmMetadataReaderMetrics {
private @Metric MutableCounterLong numSnapshotCreates;
private @Metric MutableCounterLong numSnapshotDeletes;
private @Metric MutableCounterLong numSnapshotLists;
+ private @Metric MutableCounterLong numSnapshotRenames;
private @Metric MutableCounterLong numSnapshotDiffJobs;
private @Metric MutableCounterLong numSnapshotInfos;
private @Metric MutableCounterLong numSnapshotPurges;
private @Metric MutableCounterLong numSnapshotSetProperties;
+ private @Metric MutableCounterLong numCancelSnapshotDiffs;
+ private @Metric MutableCounterLong numListSnapshotDiffJobs;
Review Comment:
https://issues.apache.org/jira/browse/HDDS-13181
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13013. [Snapshot] Add metrics and tests for snapshot operations. [ozone]
Posted by "jojochuang (via GitHub)" <gi...@apache.org>.
jojochuang commented on code in PR #8436:
URL: https://github.com/apache/ozone/pull/8436#discussion_r2130980424
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMMetrics.java:
##########
@@ -71,10 +71,13 @@ public class OMMetrics implements OmMetadataReaderMetrics {
private @Metric MutableCounterLong numSnapshotCreates;
private @Metric MutableCounterLong numSnapshotDeletes;
private @Metric MutableCounterLong numSnapshotLists;
+ private @Metric MutableCounterLong numSnapshotRenames;
private @Metric MutableCounterLong numSnapshotDiffJobs;
private @Metric MutableCounterLong numSnapshotInfos;
private @Metric MutableCounterLong numSnapshotPurges;
private @Metric MutableCounterLong numSnapshotSetProperties;
+ private @Metric MutableCounterLong numCancelSnapshotDiffs;
+ private @Metric MutableCounterLong numListSnapshotDiffJobs;
Review Comment:
@SaketaChalamchala good idea. This PR implements metrics/tests for client operations. We should add the same for internal operations like you mentioned.
This PR is already quite lengthy. Let me open another jira to track the internal snapshot operations.
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13013. [Snapshot] Add metrics and tests for snapshot operations. [ozone]
Posted by "smengcl (via GitHub)" <gi...@apache.org>.
smengcl commented on code in PR #8436:
URL: https://github.com/apache/ozone/pull/8436#discussion_r2133514529
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/snapshot/OMSnapshotRenameRequest.java:
##########
@@ -110,6 +111,9 @@ public OMRequest preExecute(OzoneManager ozoneManager) throws IOException {
@Override
public OMClientResponse validateAndUpdateCache(OzoneManager ozoneManager, ExecutionContext context) {
+ OMMetrics omMetrics = ozoneManager.getMetrics();
+ omMetrics.incNumSnapshotRenames();
+
Review Comment:
I think this could be moved by towards the end of the `try` block.
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13013. [Snapshot] Add metrics and tests for snapshot operations. [ozone]
Posted by "jojochuang (via GitHub)" <gi...@apache.org>.
jojochuang commented on code in PR #8436:
URL: https://github.com/apache/ozone/pull/8436#discussion_r2130980424
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMMetrics.java:
##########
@@ -71,10 +71,13 @@ public class OMMetrics implements OmMetadataReaderMetrics {
private @Metric MutableCounterLong numSnapshotCreates;
private @Metric MutableCounterLong numSnapshotDeletes;
private @Metric MutableCounterLong numSnapshotLists;
+ private @Metric MutableCounterLong numSnapshotRenames;
private @Metric MutableCounterLong numSnapshotDiffJobs;
private @Metric MutableCounterLong numSnapshotInfos;
private @Metric MutableCounterLong numSnapshotPurges;
private @Metric MutableCounterLong numSnapshotSetProperties;
+ private @Metric MutableCounterLong numCancelSnapshotDiffs;
+ private @Metric MutableCounterLong numListSnapshotDiffJobs;
Review Comment:
@SaketaChalamchala good idea. This PR implements metrics/tests for client operations. We should add the same for internal operations like you mentioned.
Let me open another jira to track the internal snapshot operations.
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13013. [Snapshot] Add metrics and tests for snapshot operations. [ozone]
Posted by "SaketaChalamchala (via GitHub)" <gi...@apache.org>.
SaketaChalamchala commented on code in PR #8436:
URL: https://github.com/apache/ozone/pull/8436#discussion_r2132789163
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMMetrics.java:
##########
@@ -71,10 +71,13 @@ public class OMMetrics implements OmMetadataReaderMetrics {
private @Metric MutableCounterLong numSnapshotCreates;
private @Metric MutableCounterLong numSnapshotDeletes;
private @Metric MutableCounterLong numSnapshotLists;
+ private @Metric MutableCounterLong numSnapshotRenames;
private @Metric MutableCounterLong numSnapshotDiffJobs;
private @Metric MutableCounterLong numSnapshotInfos;
private @Metric MutableCounterLong numSnapshotPurges;
private @Metric MutableCounterLong numSnapshotSetProperties;
+ private @Metric MutableCounterLong numCancelSnapshotDiffs;
+ private @Metric MutableCounterLong numListSnapshotDiffJobs;
Review Comment:
In that case let's also move SnapshotPurge metrics to the internal metrics as well.
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13013. [Snapshot] Add metrics and tests for snapshot operations. [ozone]
Posted by "smengcl (via GitHub)" <gi...@apache.org>.
smengcl commented on code in PR #8436:
URL: https://github.com/apache/ozone/pull/8436#discussion_r2133514529
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/snapshot/OMSnapshotRenameRequest.java:
##########
@@ -110,6 +111,9 @@ public OMRequest preExecute(OzoneManager ozoneManager) throws IOException {
@Override
public OMClientResponse validateAndUpdateCache(OzoneManager ozoneManager, ExecutionContext context) {
+ OMMetrics omMetrics = ozoneManager.getMetrics();
+ omMetrics.incNumSnapshotRenames();
+
Review Comment:
I think this could be moved by towards the end of the `try` block.
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13013. [Snapshot] Add metrics and tests for snapshot operations. [ozone]
Posted by "smengcl (via GitHub)" <gi...@apache.org>.
smengcl merged PR #8436:
URL: https://github.com/apache/ozone/pull/8436
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13013. [Snapshot] Add metrics and tests for snapshot operations. [ozone]
Posted by "SaketaChalamchala (via GitHub)" <gi...@apache.org>.
SaketaChalamchala commented on code in PR #8436:
URL: https://github.com/apache/ozone/pull/8436#discussion_r2132789163
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMMetrics.java:
##########
@@ -71,10 +71,13 @@ public class OMMetrics implements OmMetadataReaderMetrics {
private @Metric MutableCounterLong numSnapshotCreates;
private @Metric MutableCounterLong numSnapshotDeletes;
private @Metric MutableCounterLong numSnapshotLists;
+ private @Metric MutableCounterLong numSnapshotRenames;
private @Metric MutableCounterLong numSnapshotDiffJobs;
private @Metric MutableCounterLong numSnapshotInfos;
private @Metric MutableCounterLong numSnapshotPurges;
private @Metric MutableCounterLong numSnapshotSetProperties;
+ private @Metric MutableCounterLong numCancelSnapshotDiffs;
+ private @Metric MutableCounterLong numListSnapshotDiffJobs;
Review Comment:
In that case let's also move SnapshotPurge metrics to the internal metrics as well. This patch LGTM otherwise.
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13013. [Snapshot] Add metrics and tests for snapshot operations. [ozone]
Posted by "jojochuang (via GitHub)" <gi...@apache.org>.
jojochuang commented on PR #8436:
URL: https://github.com/apache/ozone/pull/8436#issuecomment-2873402566
cc @SaketaChalamchala
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org