HDFS-2677. Web UI should indicate the NN state. Contributed by Eli Collins.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/HDFS-1623@1220613 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
329717264f
commit
625d1b380a
|
@ -65,3 +65,5 @@ HDFS-2667. Fix transition from active to standby (todd)
|
|||
HDFS-2684. Fix up some failing unit tests on HA branch (todd)
|
||||
|
||||
HDFS-2679. Add interface to query current state to HAServiceProtocol (eli via todd)
|
||||
|
||||
HDFS-2677. Web UI should indicate the NN state. (eli via todd)
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
<%@ page
|
||||
contentType="text/html; charset=UTF-8"
|
||||
import="org.apache.hadoop.util.ServletUtil"
|
||||
import="org.apache.hadoop.ha.HAServiceProtocol.HAServiceState"
|
||||
%>
|
||||
<%!
|
||||
//for java.io.Serializable
|
||||
|
@ -30,6 +31,7 @@
|
|||
NameNode nn = NameNodeHttpServer.getNameNodeFromContext(application);
|
||||
FSNamesystem fsn = nn.getNamesystem();
|
||||
String namenodeRole = nn.getRole().toString();
|
||||
String namenodeState = HAServiceState.ACTIVE.equals(nn.getServiceState()) ? "active" : "standby";
|
||||
String namenodeLabel = nn.getNameNodeAddress().getHostName() + ":" + nn.getNameNodeAddress().getPort();
|
||||
%>
|
||||
|
||||
|
@ -40,7 +42,7 @@
|
|||
<title>Hadoop <%=namenodeRole%> <%=namenodeLabel%></title>
|
||||
|
||||
<body>
|
||||
<h1><%=namenodeRole%> '<%=namenodeLabel%>'</h1>
|
||||
<h1><%=namenodeRole%> '<%=namenodeLabel%>' (<%=namenodeState%>)</h1>
|
||||
<%= NamenodeJspHelper.getVersionTable(fsn) %>
|
||||
<br />
|
||||
<b><a href="/nn_browsedfscontent.jsp">Browse the filesystem</a></b><br>
|
||||
|
|
Loading…
Reference in New Issue