From 68c2accc20e032fc0da087fafeedadd0a3ecef01 Mon Sep 17 00:00:00 2001 From: huhaiyang Date: Mon, 4 Oct 2021 23:52:26 +0800 Subject: [PATCH] HDFS-16247. RBF: Fix the ProcessingAvgTime and ProxyAvgTime code comments and document metrics describe ms unit (#3511) --- .../hadoop-common/src/site/markdown/Metrics.md | 4 ++-- .../federation/metrics/FederationRPCPerformanceMonitor.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hadoop-common-project/hadoop-common/src/site/markdown/Metrics.md b/hadoop-common-project/hadoop-common/src/site/markdown/Metrics.md index 9e747631ca..2002e7a98f 100644 --- a/hadoop-common-project/hadoop-common/src/site/markdown/Metrics.md +++ b/hadoop-common-project/hadoop-common/src/site/markdown/Metrics.md @@ -567,9 +567,9 @@ RouterRPCMetrics shows the statistics of the Router component in Router-based fe | `RouterFailureLocked` | Number of failed requests due to locked path | | `RouterFailureSafemode` | Number of failed requests due to safe mode | | `ProcessingNumOps` | Number of operations the Router processed internally within an interval time of metric | -| `ProcessingAvgTime` | Average time for the Router to process operations in nanoseconds | +| `ProcessingAvgTime` | Average time for the Router to process operations in milliseconds | | `ProxyNumOps` | Number of times of that the Router to proxy operations to the Namenodes within an interval time of metric | -| `ProxyAvgTime` | Average time for the Router to proxy operations to the Namenodes in nanoseconds | +| `ProxyAvgTime` | Average time for the Router to proxy operations to the Namenodes in milliseconds | StateStoreMetrics ----------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/metrics/FederationRPCPerformanceMonitor.java b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/metrics/FederationRPCPerformanceMonitor.java index 64936e28a6..dc53f8a24e 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/metrics/FederationRPCPerformanceMonitor.java +++ b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/metrics/FederationRPCPerformanceMonitor.java @@ -218,7 +218,7 @@ public void routerFailureLocked() { /** * Get time between we receiving the operation and sending it to the Namenode. - * @return Processing time in nanoseconds. + * @return Processing time in milliseconds. */ private long getProcessingTime() { if (START_TIME.get() != null && START_TIME.get() > 0 && @@ -230,7 +230,7 @@ private long getProcessingTime() { /** * Get time between now and when the operation was forwarded to the Namenode. - * @return Current proxy time in nanoseconds. + * @return Current proxy time in milliseconds. */ private long getProxyTime() { if (PROXY_TIME.get() != null && PROXY_TIME.get() > 0) {