[
https://issues.apache.org/jira/browse/HDDS-816?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16680965#comment-16680965
]
Yiqun Lin commented on HDDS-816:
--------------------------------
Thanks for the explanation, [~bharatviswa].
Looks like we can extract {{metrics.incNumVolumeCreates();}} before
{{s3BucketManager.createOzoneVolumeIfNeeded}}. Actually we just increase the
ops of creating volume, no matter if it's successfully or not.
{code}
try {
metrics.incNumVolumeCreates();
+ boolean newVolumeCreate = s3BucketManager.createOzoneVolumeIfNeeded(
+ userName, ozoneVolumeName);
+ if (newVolumeCreate) {
+ metrics.incNumVolumes();
+ }
+ } catch (IOException ex) {
+ // We need to increment volume creates also because this is first
+ // time we are trying to create a volume, it failed. As we increment
+ // ops and create when we try to do that operation.
+ metrics.incNumVolumeCreateFails();
+ throw ex;
+ }
{code}
{quote}
As during restarts how we persist these values. So, we have created a doc with
proposals and proposed approach.
{quote}
It's a good point! I read four approaches, I prefer to use the 4th approach but
can make a little improvement. Concretely to say, we can use a delayed-load way
to initialize the metrics count. Using a independent thread to scan the db
tables can be a solution. We don't need to let metrics initialization as a must
thing to complete during om startup. Based on this way, there will be a short
time the metrics count of volume/buckes/keys are not accurate.
> Create OM metrics for bucket, volume, keys
> ------------------------------------------
>
> Key: HDDS-816
> URL: https://issues.apache.org/jira/browse/HDDS-816
> Project: Hadoop Distributed Data Store
> Issue Type: Bug
> Components: Ozone Manager
> Reporter: Bharat Viswanadham
> Assignee: Bharat Viswanadham
> Priority: Major
> Attachments: HDDS-816.00.patch, Metrics for number of volumes,
> buckets, keys.pdf
>
>
> This Jira is used to create the following metrics in Ozone manager.
> # number of volumesÂ
> # number of buckets
> # number of keys
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]