Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Jun 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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