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 dff95c5eca)
This commit is contained in:
zhuxiangyi 2021-04-23 09:19:11 +08:00 committed by Takanobu Asanuma
parent 9f2db2c9fd
commit 2752156e3e
2 changed files with 9 additions and 1 deletions

View File

@ -825,7 +825,7 @@ public class NamenodeBeanMetrics
@Override
public String getEnteringMaintenanceNodes() {
return "N/A";
return "{}";
}
@Override

View File

@ -1717,6 +1717,14 @@ public class TestRouterRpc {
assertEquals(0, metrics.getNumLiveNodes());
}
@Test
public void testNamenodeMetricsEnteringMaintenanceNodes() throws IOException {
final NamenodeBeanMetrics metrics =
router.getRouter().getNamenodeMetrics();
assertEquals("{}", metrics.getEnteringMaintenanceNodes());
}
@Test
public void testCacheAdmin() throws Exception {
DistributedFileSystem routerDFS = (DistributedFileSystem) routerFS;