Skip to content

Commit 2752156

Browse files
zhuxiangyizhuxiangyi
authored andcommitted
HDFS-15974. RBF: Unable to display the datanode UI of the router (#2915)
Co-authored-by: zhuxiangyi <zhuxiangyi@360.cn> Reviewed-by: Inigo Goiri <inigoiri@apache.org> Signed-off-by: Takanobu Asanuma <tasanuma@apache.org> (cherry picked from commit dff95c5)
1 parent 9f2db2c commit 2752156

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/metrics/NamenodeBeanMetrics.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,7 @@ public long getNumberOfSnapshottableDirs() {
825825

826826
@Override
827827
public String getEnteringMaintenanceNodes() {
828-
return "N/A";
828+
return "{}";
829829
}
830830

831831
@Override

hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/router/TestRouterRpc.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1717,6 +1717,14 @@ public void testRBFMetricsMethodsRelayOnStateStore() {
17171717
assertEquals(0, metrics.getNumLiveNodes());
17181718
}
17191719

1720+
@Test
1721+
public void testNamenodeMetricsEnteringMaintenanceNodes() throws IOException {
1722+
final NamenodeBeanMetrics metrics =
1723+
router.getRouter().getNamenodeMetrics();
1724+
1725+
assertEquals("{}", metrics.getEnteringMaintenanceNodes());
1726+
}
1727+
17201728
@Test
17211729
public void testCacheAdmin() throws Exception {
17221730
DistributedFileSystem routerDFS = (DistributedFileSystem) routerFS;

0 commit comments

Comments
 (0)