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 9a67fed1268..9e12941a55d 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 void start() throws IOException { 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());