Skip to content

Commit

Permalink
HBASE-27037 Display the region server state on the Web UI (#4432)
Browse files Browse the repository at this point in the history
Signed-off-by: Pankaj Kumar <[email protected]>
Signed-off-by: Duo Zhang <[email protected]>
(cherry picked from commit db99208)
  • Loading branch information
tomscut authored and Apache9 committed Jun 2, 2022
1 parent 40c2743 commit b21930f
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down Expand Up @@ -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>
Expand Down

0 comments on commit b21930f

Please sign in to comment.