You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/12/15 00:08:46 UTC

[GitHub] [ozone] bharatviswa504 commented on a change in pull request #2913: HDDS-6098. Add a metric to track amount of data committed.

bharatviswa504 commented on a change in pull request #2913:
URL: https://github.com/apache/ozone/pull/2913#discussion_r769141143



##########
File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyCommitRequest.java
##########
@@ -339,6 +339,7 @@ protected void processResult(CommitKeyRequest commitKeyRequest,
       // versioning of keys. So, this can be revisited later.
       if (omKeyInfo.getKeyLocationVersions().size() == 1) {
         omMetrics.incNumKeys();
+        omMetrics.incDataCommittedBytes(omKeyInfo.getDataSize());

Review comment:
       For numKeys we do best effort of writing a file in shutdown hook. (If unclean shutdown, numbers will not be accurate)
   ``    shutdownHook = () -> {
         saveOmMetrics();
       };
   ``

##########
File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyCommitRequest.java
##########
@@ -339,6 +339,7 @@ protected void processResult(CommitKeyRequest commitKeyRequest,
       // versioning of keys. So, this can be revisited later.
       if (omKeyInfo.getKeyLocationVersions().size() == 1) {
         omMetrics.incNumKeys();
+        omMetrics.incDataCommittedBytes(omKeyInfo.getDataSize());

Review comment:
       And also when key is overwrite, do we want to consider that also here.




-- 
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