You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zh...@apache.org on 2022/06/02 13:19:55 UTC

[hbase] branch master updated: HBASE-27037 Display the region server state on the Web UI (#4432)

This is an automated email from the ASF dual-hosted git repository.

zhangduo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
     new db992083aff HBASE-27037 Display the region server state on the Web UI (#4432)
db992083aff is described below

commit db992083aff354cc7bc5cee96af7db45d2852531
Author: litao <to...@gmail.com>
AuthorDate: Thu Jun 2 21:19:45 2022 +0800

    HBASE-27037 Display the region server state on the Web UI (#4432)
    
    Signed-off-by: Pankaj Kumar <pa...@apache.org>
    Signed-off-by: Duo Zhang <zh...@apache.org>
---
 .../org/apache/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 a3067eeaf8a..b764ae428f0 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<ServerName> 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);
 <tr><td>Total:<% servers.size() %></td>
 <td></td>
 <td></td>
+<td></td>
 <%if inconsistentNodeNum > 0%>
   <td style="color:red;"><% inconsistentNodeNum %> nodes with inconsistent version</td>
 <%else>