diff --git a/hbase-server/src/main/resources/hbase-webapps/master/backupMasterStatus.jsp b/hbase-server/src/main/resources/hbase-webapps/master/backupMasterStatus.jsp index cada34472c95..28f56837d606 100644 --- a/hbase-server/src/main/resources/hbase-webapps/master/backupMasterStatus.jsp +++ b/hbase-server/src/main/resources/hbase-webapps/master/backupMasterStatus.jsp @@ -20,14 +20,12 @@ <%@ page contentType="text/html;charset=UTF-8" import="java.util.*" import="org.apache.hadoop.hbase.ServerName" - import="org.apache.hadoop.hbase.master.HMaster" - import="org.apache.hbase.thirdparty.com.google.common.base.Preconditions" %> + import="org.apache.hadoop.hbase.master.HMaster" %> <% HMaster master = (HMaster) getServletContext().getAttribute(HMaster.MASTER); if (!master.isActiveMaster()) { ServerName active_master = master.getActiveMaster().orElse(null); - Preconditions.checkState(active_master != null, "Failed to retrieve active master's ServerName!"); int activeInfoPort = master.getActiveMasterInfoPort(); %>
@@ -35,8 +33,16 @@

Backup Master <%= master.getServerName().getHostname() %>

+ <% if (active_master != null) { %>

Current Active Master: <%= active_master.getHostname() %>

+ <% } else { %> +
+

Cluster is starting, active master not yet elected

+

No active master has been found. This is normal during cluster startup or master failover. + Please refresh manually in a few seconds.

+
+ <% } %> <% } else { %>

Backup Masters