diff --git a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterRpcServer.java b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterRpcServer.java index 0b9d5eaa6897a..89d356cd4545e 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterRpcServer.java +++ b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterRpcServer.java @@ -1893,8 +1893,10 @@ public RouterClientProtocol getClientProtocolModule() { /** * Get RPC metrics info. + * May return null if `dfs.federation.router.metrics.enable` is false. * @return The instance of FederationRPCMetrics. */ + @VisibleForTesting public FederationRPCMetrics getRPCMetrics() { return this.rpcMonitor.getRPCMetrics(); }