This is an automated email from the ASF dual-hosted git repository.

adoroszlai 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 5980c72b970 HDDS-17860. Remove XceiverClientMetrics.reset(), used only 
by TestKeyInputStream (#12098)
5980c72b970 is described below

commit 5980c72b970e2ba2a1c050ea165ff29e87fdcd49
Author: Andy Huang <[email protected]>
AuthorDate: Fri Nov 20 17:05:55 2026 +0800

    HDDS-17860. Remove XceiverClientMetrics.reset(), used only by 
TestKeyInputStream (#12098)
---
 .../java/org/apache/hadoop/hdds/scm/XceiverClientManager.java    | 9 ---------
 .../java/org/apache/hadoop/hdds/scm/XceiverClientMetrics.java    | 9 ---------
 .../apache/hadoop/ozone/client/rpc/read/TestKeyInputStream.java  | 2 --
 3 files changed, 20 deletions(-)

diff --git 
a/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/XceiverClientManager.java
 
b/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/XceiverClientManager.java
index 4baa72aff69..ec029c46888 100644
--- 
a/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/XceiverClientManager.java
+++ 
b/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/XceiverClientManager.java
@@ -402,15 +402,6 @@ public static synchronized XceiverClientMetrics 
getXceiverClientMetrics() {
     return metrics;
   }
 
-  /**
-   * Reset xceiver client metric.
-   */
-  public static synchronized void resetXceiverClientMetrics() {
-    if (metrics != null) {
-      metrics.reset();
-    }
-  }
-
   /**
    * Configuration for HDDS client.
    */
diff --git 
a/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/XceiverClientMetrics.java
 
b/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/XceiverClientMetrics.java
index 80fd95b28aa..a4f679947b0 100644
--- 
a/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/XceiverClientMetrics.java
+++ 
b/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/XceiverClientMetrics.java
@@ -56,10 +56,6 @@ public class XceiverClientMetrics implements MetricsSource {
   private MetricsRegistry registry;
 
   public XceiverClientMetrics() {
-    init();
-  }
-
-  public void init() {
     OzoneConfiguration conf = new OzoneConfiguration();
     int[] intervals = 
conf.getInts(OzoneConfigKeys.OZONE_XCEIVER_CLIENT_METRICS_PERCENTILES_INTERVALS_SECONDS_KEY);
 
@@ -124,11 +120,6 @@ public long 
getContainerOpCountMetrics(ContainerProtos.Type type) {
     return opsArray.get(type).value();
   }
 
-  @VisibleForTesting
-  public void reset() {
-    init();
-  }
-
   @Override
   public void getMetrics(MetricsCollector collector, boolean b) {
     MetricsRecordBuilder recordBuilder = collector.addRecord(SOURCE_NAME);
diff --git 
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/read/TestKeyInputStream.java
 
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/read/TestKeyInputStream.java
index ad882f8bc5e..fdaaf03fce2 100644
--- 
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/read/TestKeyInputStream.java
+++ 
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/read/TestKeyInputStream.java
@@ -255,7 +255,6 @@ public void testECSeek(BucketForTesting bucket) throws 
Exception {
   }
 
   public void testSeek(BucketForTesting bucket) throws Exception {
-    XceiverClientManager.resetXceiverClientMetrics();
     XceiverClientMetrics metrics = XceiverClientManager
         .getXceiverClientMetrics();
     long writeChunkCount = metrics.getContainerOpCountMetrics(
@@ -342,7 +341,6 @@ public void testReadChunkWithByteBuffer(BucketForTesting 
bucket) throws Exceptio
   }
 
   private void testSkip(BucketForTesting bucket) throws Exception {
-    XceiverClientManager.resetXceiverClientMetrics();
     XceiverClientMetrics metrics = XceiverClientManager
         .getXceiverClientMetrics();
     long writeChunkCount = metrics.getContainerOpCountMetrics(


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to