This is an automated email from the ASF dual-hosted git repository.
chungen0126 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 4199621f1bc HDDS-16726. Remove unused metrics from OMMetrics (#11421)
4199621f1bc is described below
commit 4199621f1bcfcf0c409226901b9636c952e8641c
Author: Chi-Hsuan Huang <[email protected]>
AuthorDate: Wed Oct 14 10:01:57 2026 +0800
HDDS-16726. Remove unused metrics from OMMetrics (#11421)
---
.../grafana/dashboards/Ozone - OM Overview.json | 2 +-
.../dashboards/Ozone - Overall Metrics.json | 87 +--------------------
.../java/org/apache/hadoop/ozone/om/OMMetrics.java | 91 ----------------------
.../org/apache/hadoop/ozone/om/OzoneManager.java | 4 -
4 files changed, 2 insertions(+), 182 deletions(-)
diff --git a/hadoop-ozone/dist/src/main/compose/common/grafana/dashboards/Ozone
- OM Overview.json
b/hadoop-ozone/dist/src/main/compose/common/grafana/dashboards/Ozone - OM
Overview.json
index 803711e28ec..5dce95b969c 100644
--- a/hadoop-ozone/dist/src/main/compose/common/grafana/dashboards/Ozone - OM
Overview.json
+++ b/hadoop-ozone/dist/src/main/compose/common/grafana/dashboards/Ozone - OM
Overview.json
@@ -1294,7 +1294,7 @@
"datasource": {
"type": "prometheus"
},
- "description": "**Paired legends** match **Buckets & layouts — rate**
(seven series). OBS+FSO create/delete **`om_metrics`** rows are summed on the
rate side. **`service list`** is **OmClient ServiceList RPC**
(**`om_client_protocol_*`** rate/latency), not
**`om_metrics_num_bucket_s3_lists`** (that counter has no callers in OM).
**`GetS3VolumeContext`** likewise uses **`om_client_protocol_*`**.",
+ "description": "**Paired legends** match **Buckets & layouts — rate**
(seven series). OBS+FSO create/delete **`om_metrics`** rows are summed on the
rate side. **`service list`** is **OmClient ServiceList RPC**
(**`om_client_protocol_*`** rate/latency). **`GetS3VolumeContext`** likewise
uses **`om_client_protocol_*`**.",
"fieldConfig": {
"defaults": {
"color": {
diff --git a/hadoop-ozone/dist/src/main/compose/common/grafana/dashboards/Ozone
- Overall Metrics.json
b/hadoop-ozone/dist/src/main/compose/common/grafana/dashboards/Ozone - Overall
Metrics.json
index dd2c443409c..ee620d8d5f8 100644
--- a/hadoop-ozone/dist/src/main/compose/common/grafana/dashboards/Ozone -
Overall Metrics.json
+++ b/hadoop-ozone/dist/src/main/compose/common/grafana/dashboards/Ozone -
Overall Metrics.json
@@ -183,91 +183,6 @@
"x": 0,
"y": 10
},
- "id": 68,
- "options": {
- "legend": {
- "calcs": [],
- "displayMode": "list",
- "placement": "bottom"
- },
- "tooltip": {
- "mode": "single",
- "sort": "none"
- }
- },
- "pluginVersion": "8.4.2",
- "targets": [
- {
- "datasource": {
- "type": "prometheus"
- },
- "exemplar": true,
- "expr": "om_metrics_num_s3_buckets",
- "interval": "",
- "legendFormat": "",
- "refId": "A"
- }
- ],
- "title": "om_metrics_num_s3_buckets",
- "type": "timeseries"
- },
- {
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "palette-classic"
- },
- "custom": {
- "axisLabel": "",
- "axisPlacement": "auto",
- "barAlignment": 0,
- "drawStyle": "line",
- "fillOpacity": 0,
- "gradientMode": "none",
- "hideFrom": {
- "legend": false,
- "tooltip": false,
- "viz": false
- },
- "lineInterpolation": "linear",
- "lineWidth": 1,
- "pointSize": 5,
- "scaleDistribution": {
- "type": "linear"
- },
- "showPoints": "auto",
- "spanNulls": false,
- "stacking": {
- "group": "A",
- "mode": "none"
- },
- "thresholdsStyle": {
- "mode": "off"
- }
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 8,
- "w": 8,
- "x": 8,
- "y": 10
- },
"id": 262,
"options": {
"legend": {
@@ -350,7 +265,7 @@
"gridPos": {
"h": 8,
"w": 8,
- "x": 16,
+ "x": 8,
"y": 10
},
"id": 263,
diff --git
a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMMetrics.java
b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMMetrics.java
index 5b2bc2b32ae..7fec1d1e3cc 100644
---
a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMMetrics.java
+++
b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMMetrics.java
@@ -55,7 +55,6 @@ public class OMMetrics implements OmMetadataReaderMetrics {
private @Metric MutableCounterLong numVolumeCreates;
private @Metric MutableCounterLong numVolumeUpdates;
private @Metric MutableCounterLong numVolumeInfos;
- private @Metric MutableCounterLong numVolumeCheckAccesses;
private @Metric MutableCounterLong numBucketCreates;
private @Metric MutableCounterLong numFSOBucketCreates;
private @Metric MutableCounterLong numVolumeDeletes;
@@ -76,7 +75,6 @@ public class OMMetrics implements OmMetadataReaderMetrics {
private @Metric MutableCounterLong numKeyHSyncs;
private @Metric MutableCounterLong numBlockAllocations;
private @Metric MutableCounterLong numGetServiceLists;
- private @Metric MutableCounterLong numBucketS3Lists;
private @Metric MutableCounterLong numInitiateMultipartUploads;
private @Metric MutableCounterLong numCompleteMultipartUploads;
private @Metric MutableCounterLong numSnapshotCreates;
@@ -133,7 +131,6 @@ public class OMMetrics implements OmMetadataReaderMetrics {
private @Metric MutableCounterLong numVolumeInfoFails;
private @Metric MutableCounterLong numVolumeDeleteFails;
private @Metric MutableCounterLong numBucketCreateFails;
- private @Metric MutableCounterLong numVolumeCheckAccessFails;
private @Metric MutableCounterLong numBucketInfoFails;
private @Metric MutableCounterLong numBucketUpdateFails;
private @Metric MutableCounterLong numBucketDeleteFails;
@@ -148,8 +145,6 @@ public class OMMetrics implements OmMetadataReaderMetrics {
private @Metric MutableCounterLong numVolumeListFails;
private @Metric MutableCounterLong numKeyCommitFails;
private @Metric MutableCounterLong numBlockAllocationFails;
- private @Metric MutableCounterLong numGetServiceListFails;
- private @Metric MutableCounterLong numBucketS3ListFails;
private @Metric MutableCounterLong numInitiateMultipartUploadFails;
private @Metric MutableCounterLong numCommitMultipartUploadParts;
private @Metric MutableCounterLong numCommitMultipartUploadPartFails;
@@ -224,18 +219,12 @@ public class OMMetrics implements OmMetadataReaderMetrics
{
private @Metric MutableGaugeLong numVolumes;
private @Metric MutableGaugeLong numBuckets;
- private @Metric MutableCounterLong numS3Buckets;
//TODO: This metric is an estimate and it may be inaccurate on restart if the
// OM process was not shutdown cleanly. Key creations/deletions in the last
// few minutes before restart may not be included in this count.
private @Metric MutableGaugeLong numKeys;
- private @Metric MutableCounterLong numBucketS3Creates;
- private @Metric MutableCounterLong numBucketS3CreateFails;
- private @Metric MutableCounterLong numBucketS3Deletes;
- private @Metric MutableCounterLong numBucketS3DeleteFails;
-
private @Metric MutableCounterLong numListMultipartUploadFails;
private @Metric MutableCounterLong numListMultipartUploads;
@@ -243,7 +232,6 @@ public class OMMetrics implements OmMetadataReaderMetrics {
private @Metric MutableCounterLong numTrashRenames;
private @Metric MutableCounterLong numTrashDeletes;
private @Metric MutableCounterLong numTrashListStatus;
- private @Metric MutableCounterLong numTrashListKeys;
private @Metric MutableCounterLong numTrashGetFileStatus;
private @Metric MutableCounterLong numTrashGetTrashRoots;
private @Metric MutableCounterLong numTrashExists;
@@ -251,7 +239,6 @@ public class OMMetrics implements OmMetadataReaderMetrics {
private @Metric MutableCounterLong numTrashFilesRenames;
private @Metric MutableCounterLong numTrashFilesDeletes;
private @Metric MutableCounterLong numTrashActiveCycles;
- private @Metric MutableCounterLong numTrashCheckpointsProcessed;
private @Metric MutableCounterLong numTrashFails;
private @Metric MutableCounterLong numTrashRootsEnqueued;
private @Metric MutableCounterLong numTrashRootsProcessed;
@@ -320,37 +307,10 @@ public void stopSnapshotDirectoryMetrics() {
}
}
- public void incNumS3BucketCreates() {
- numBucketOps.incr();
- numBucketS3Creates.incr();
- }
-
- public void incNumS3BucketCreateFails() {
- numBucketS3CreateFails.incr();
- }
-
- public void incNumS3BucketDeletes() {
- numBucketOps.incr();
- numBucketS3Deletes.incr();
- }
-
- public void incNumS3BucketDeleteFails() {
- numBucketOps.incr();
- numBucketS3DeleteFails.incr();
- }
-
public void incDataCommittedBytes(long bytesWritten) {
totalDataCommitted.incr(bytesWritten);
}
- public void incNumS3Buckets() {
- numS3Buckets.incr();
- }
-
- public void decNumS3Buckets() {
- numS3Buckets.incr();
- }
-
public void incNumVolumes() {
numVolumes.incr();
}
@@ -435,11 +395,6 @@ public void incNumVolumeDeletes() {
numVolumeDeletes.incr();
}
- public void incNumVolumeCheckAccesses() {
- numVolumeOps.incr();
- numVolumeCheckAccesses.incr();
- }
-
public void incNumBucketCreates() {
numBucketOps.incr();
numBucketCreates.incr();
@@ -484,15 +439,6 @@ public void incNumVolumeLists() {
numVolumeLists.incr();
}
- public void incNumListS3Buckets() {
- numBucketOps.incr();
- numBucketS3Lists.incr();
- }
-
- public void incNumListS3BucketsFails() {
- numBucketS3ListFails.incr();
- }
-
public void incNumListOpenFiles() {
numKeyOps.incr();
numListOpenFiles.incr();
@@ -609,10 +555,6 @@ public void incNumSnapshotDeleted() {
numSnapshotDeleted.incr();
}
- public void decNumSnapshotDeleted() {
- numSnapshotDeleted.incr(-1);
- }
-
public int getNumSnapshotCacheSize() {
return numSnapshotCacheSize.value();
}
@@ -817,10 +759,6 @@ public void incNumVolumeDeleteFails() {
numVolumeDeleteFails.incr();
}
- public void incNumVolumeCheckAccessFails() {
- numVolumeCheckAccessFails.incr();
- }
-
public void incNumBucketCreateFails() {
numBucketCreateFails.incr();
}
@@ -941,10 +879,6 @@ public void incNumVolumeListFails() {
numVolumeListFails.incr();
}
- public void incNumGetServiceListFails() {
- numGetServiceListFails.incr();
- }
-
public void incNumOpenKeyDeleteRequests() {
numOpenKeyDeleteRequests.incr();
}
@@ -1110,11 +1044,6 @@ public long getNumVolumeDeletes() {
return numVolumeDeletes.value();
}
- @VisibleForTesting
- public long getNumVolumeCheckAccesses() {
- return numVolumeCheckAccesses.value();
- }
-
@VisibleForTesting
public long getNumBucketCreates() {
return numBucketCreates.value();
@@ -1185,11 +1114,6 @@ public long getNumVolumeDeleteFails() {
return numVolumeDeleteFails.value();
}
- @VisibleForTesting
- public long getNumVolumeCheckAccessFails() {
- return numVolumeCheckAccessFails.value();
- }
-
@VisibleForTesting
public long getNumBucketCreateFails() {
return numBucketCreateFails.value();
@@ -1335,21 +1259,6 @@ public long getNumBlockAllocateFails() {
return numBlockAllocationFails.value();
}
- @VisibleForTesting
- public long getNumGetServiceListFails() {
- return numGetServiceListFails.value();
- }
-
- @VisibleForTesting
- public long getNumListS3Buckets() {
- return numBucketS3Lists.value();
- }
-
- @VisibleForTesting
- public long getNumListS3BucketsFails() {
- return numBucketS3ListFails.value();
- }
-
@VisibleForTesting
public long getDataCommittedBytes() {
return totalDataCommitted.value();
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 efb1f0d6201..6ce97108c2d 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
@@ -3909,10 +3909,6 @@ public List<ServiceInfo> getServiceList() throws
IOException {
services.add(scmServiceInfoBuilder.build());
}
metrics.incNumGetServiceLists();
- // For now there is no exception that can can happen in this call,
- // so failure metrics is not handled. In future if there is any need to
- // handle exception in this method, we need to incorporate
- // metrics.incNumGetServiceListFails()
AUDIT.logReadSuccess(
buildAuditMessageForSuccess(OMAction.GET_SERVICE_LIST,
new LinkedHashMap<>()));
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]