HBASE-21407 Resolve NPE in backup Master UI

Signed-off-by: Michael Stack <stack@apache.org>
This commit is contained in:
jingyuntian 2018-10-30 16:35:39 +08:00 committed by Michael Stack
parent 62d73d2068
commit 3836967e05
No known key found for this signature in database
GPG Key ID: 9816C7FC8ACC93D2
1 changed files with 8 additions and 2 deletions

View File

@ -18,7 +18,11 @@
*/
--%>
<%@ page contentType="text/html;charset=UTF-8"
import="org.apache.hadoop.hbase.HBaseConfiguration"
import="org.apache.hadoop.hbase.master.HMaster"
import="org.apache.hadoop.hbase.HBaseConfiguration"
%>
<%
HMaster master = (HMaster) getServletContext().getAttribute(HMaster.MASTER);
%>
<!DOCTYPE html>
<?xml version="1.0" encoding="UTF-8" ?>
@ -52,7 +56,9 @@
<ul class="nav navbar-nav">
<li><a href="/master-status">Home</a></li>
<li><a href="/tablesDetailed.jsp">Table Details</a></li>
<li><a href="/procedures.jsp">Procedures</a></li>
<% if (master.isActiveMaster()){ %>
<li><a href="/procedures.jsp">Procedures &amp; Locks</a></li>
<% }%>
<li><a href="/processMaster.jsp">Process Metrics</a></li>
<li><a href="/logs/">Local Logs</a></li>
<li><a href="/logLevel">Log Level</a></li>