HBASE-27037 Display the region server state on the Web UI (#4432)

Signed-off-by: Pankaj Kumar <pankajkumar@apache.org>
Signed-off-by: Duo Zhang <zhangduo@apache.org>
This commit is contained in:
litao 2022-06-02 21:19:45 +08:00 committed by GitHub
parent e555ac4a99
commit db992083af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -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>