dfsnodelist.jsp 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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.NodeListJsp nodelistjsp = new NamenodeJspHelper.NodeListJsp();
  30. NameNode nn = NameNodeHttpServer.getNameNodeFromContext(application);
  31. String namenodeRole = nn.getRole().toString();
  32. FSNamesystem fsn = nn.getNamesystem();
  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%> <%=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><br>
  45. <b><a href=/dfshealth.jsp> Go back to DFS home</a></b>
  46. <hr>
  47. <% nodelistjsp.generateNodesList(application, out, request); %>
  48. <%
  49. out.println(ServletUtil.htmlFooter());
  50. %>