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>
This commit is contained in:
zhuxiangyi 2021-04-23 09:19:11 +08:00 committed by GitHub
parent c4c0683dff
commit dff95c5eca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

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

View File

@ -1748,6 +1748,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;