From db992083aff354cc7bc5cee96af7db45d2852531 Mon Sep 17 00:00:00 2001 From: litao Date: Thu, 2 Jun 2022 21:19:45 +0800 Subject: [PATCH] HBASE-27037 Display the region server state on the Web UI (#4432) Signed-off-by: Pankaj Kumar Signed-off-by: Duo Zhang --- .../hadoop/hbase/tmpl/master/RegionServerListTmpl.jamon | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/RegionServerListTmpl.jamon b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/RegionServerListTmpl.jamon index a3067eeaf8ad..b764ae428f01 100644 --- a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/RegionServerListTmpl.jamon +++ b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/RegionServerListTmpl.jamon @@ -97,9 +97,13 @@ Arrays.sort(serverNames); int totalRegions = 0; int totalRequestsPerSecond = 0; int inconsistentNodeNum = 0; + String state = "Normal"; String masterVersion = VersionInfo.getVersion(); + Set decommissionedServers = new HashSet<>(master.listDecommissionedRegionServers()); for (ServerName serverName: serverNames) { - + if (decommissionedServers.contains(serverName)) { + state = "Decommissioned"; + } ServerMetrics sl = master.getServerManager().getLoad(serverName); String version = master.getRegionServerVersion(serverName); if (!masterVersion.equals(version)) { @@ -134,6 +138,7 @@ Arrays.sort(serverNames); Total:<% servers.size() %> + <%if inconsistentNodeNum > 0%> <% inconsistentNodeNum %> nodes with inconsistent version <%else>