Browse Source

HDFS-16247. RBF: Fix the ProcessingAvgTime and ProxyAvgTime code comments and document metrics describe ms unit (#3511)

huhaiyang 3 years ago
parent
commit
68c2accc20

+ 2 - 2
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
 -----------------

+ 2 - 2
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/metrics/FederationRPCPerformanceMonitor.java

@@ -218,7 +218,7 @@ public class FederationRPCPerformanceMonitor implements RouterRpcMonitor {
 
   /**
    * 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 @@ public class FederationRPCPerformanceMonitor implements RouterRpcMonitor {
 
   /**
    * 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) {