From 51dcbd1d611015a31c9d68b0d3bcf29f4d73db34 Mon Sep 17 00:00:00 2001 From: wangzhaohui <32935220+wzhallright@users.noreply.github.com> Date: Mon, 24 Apr 2023 03:43:02 +0800 Subject: [PATCH] HDFS-16988. Improve NameServices info at JournalNode web UI (#5584). Contributed by Zhaohui Wang. Signed-off-by: Ayush Saxena --- .../hadoop-hdfs/src/main/webapps/journal/jn.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/journal/jn.js b/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/journal/jn.js index 7be48f1e04d..260615b0e21 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/journal/jn.js +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/journal/jn.js @@ -61,7 +61,9 @@ function workaround(journals) { for (var i in journals){ - journals[i]['NameService']= journals[i]['modelerType'].split("-")[1]; + var str= journals[i]['modelerType']; + var index= str.indexOf("-"); + journals[i]['NameService']= str.substr(index + 1); } return journals;