This is an automated email from the ASF dual-hosted git repository.
guohao1225 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new 879c6ca59c HDDS-10862. Reduce time spent on initializing metrics
during OM start (#6682)
879c6ca59c is described below
commit 879c6ca59c69ffb10d89093a44900aae77221506
Author: Li minyu <[email protected]>
AuthorDate: Mon May 27 11:55:37 2024 +0800
HDDS-10862. Reduce time spent on initializing metrics during OM start
(#6682)
HDDS-10862. Reduce time spent on initializing metrics during OM start
---
.../src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git
a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
index 9a67fed126..9e12941a55 100644
---
a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
+++
b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
@@ -1668,11 +1668,10 @@ public final class OzoneManager extends
ServiceRuntimeInfoImpl
versionManager.getMetadataLayoutVersion(), layoutVersionInDB);
}
- // Set metrics and start metrics back ground thread
- metrics.setNumVolumes(metadataManager.countRowsInTable(metadataManager
- .getVolumeTable()));
- metrics.setNumBuckets(metadataManager.countRowsInTable(metadataManager
- .getBucketTable()));
+ metrics.setNumVolumes(metadataManager
+ .countEstimatedRowsInTable(metadataManager.getVolumeTable()));
+ metrics.setNumBuckets(metadataManager
+ .countEstimatedRowsInTable(metadataManager.getBucketTable()));
if (getMetricsStorageFile().exists()) {
OmMetricsInfo metricsInfo = READER.readValue(getMetricsStorageFile());
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]