1
0

dfshealth.jsp 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <%
  2. /*
  3. * Licensed to the Apache Software Foundation (ASF) under one
  4. * or more contributor license agreements. See the NOTICE file
  5. * distributed with this work for additional information
  6. * regarding copyright ownership. The ASF licenses this file
  7. * to you under the Apache License, Version 2.0 (the
  8. * "License"); you may not use this file except in compliance
  9. * with the License. You may obtain a copy of the License at
  10. *
  11. * http://www.apache.org/licenses/LICENSE-2.0
  12. *
  13. * Unless required by applicable law or agreed to in writing, software
  14. * distributed under the License is distributed on an "AS IS" BASIS,
  15. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16. * See the License for the specific language governing permissions and
  17. * limitations under the License.
  18. */
  19. %>
  20. <%@ page
  21. contentType="text/html; charset=UTF-8"
  22. import="org.apache.hadoop.util.ServletUtil"
  23. %>
  24. <%!
  25. //for java.io.Serializable
  26. private static final long serialVersionUID = 1L;
  27. %>
  28. <%
  29. final NamenodeJspHelper.HealthJsp healthjsp = new NamenodeJspHelper.HealthJsp();
  30. NameNode nn = NameNodeHttpServer.getNameNodeFromContext(application);
  31. FSNamesystem fsn = nn.getNamesystem();
  32. String namenodeRole = nn.getRole().toString();
  33. String namenodeLabel = nn.getNameNodeAddress().getHostName() + ":" + nn.getNameNodeAddress().getPort();
  34. %>
  35. <!DOCTYPE html>
  36. <html>
  37. <link rel="stylesheet" type="text/css" href="/static/hadoop.css">
  38. <title>Hadoop <%=namenodeRole%>&nbsp;<%=namenodeLabel%></title>
  39. <body>
  40. <h1><%=namenodeRole%> '<%=namenodeLabel%>'</h1>
  41. <%= NamenodeJspHelper.getVersionTable(fsn) %>
  42. <br />
  43. <b><a href="/nn_browsedfscontent.jsp">Browse the filesystem</a></b><br>
  44. <b><a href="/logs/"><%=namenodeRole%> Logs</a></b>
  45. <hr>
  46. <h3>Cluster Summary</h3>
  47. <b> <%= NamenodeJspHelper.getSecurityModeText()%> </b>
  48. <b> <%= NamenodeJspHelper.getSafeModeText(fsn)%> </b>
  49. <b> <%= NamenodeJspHelper.getInodeLimitText(fsn)%> </b>
  50. <%= NamenodeJspHelper.getCorruptFilesWarning(fsn)%>
  51. <% healthjsp.generateHealthReport(out, nn, request); %>
  52. <hr>
  53. <% healthjsp.generateConfReport(out, nn, request); %>
  54. <%
  55. out.println(ServletUtil.htmlFooter());
  56. %>