View Javadoc

1   package org.apache.hadoop.hbase.generated.master;
2   
3   import javax.servlet.*;
4   import javax.servlet.http.*;
5   import javax.servlet.jsp.*;
6   import static org.apache.commons.lang.StringEscapeUtils.escapeXml;
7   import org.apache.hadoop.conf.Configuration;
8   import org.apache.hadoop.hbase.master.HMaster;
9   import org.apache.hadoop.hbase.client.Admin;
10  import org.apache.hadoop.hbase.client.Connection;
11  import org.apache.hadoop.hbase.client.ConnectionFactory;
12  import org.apache.hadoop.hbase.HTableDescriptor;
13  import org.apache.hadoop.hbase.HBaseConfiguration;
14  
15  public final class tablesDetailed_jsp extends org.apache.jasper.runtime.HttpJspBase
16      implements org.apache.jasper.runtime.JspSourceDependent {
17  
18    private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory();
19  
20    private static java.util.Vector _jspx_dependants;
21  
22    private org.apache.jasper.runtime.ResourceInjector _jspx_resourceInjector;
23  
24    public Object getDependants() {
25      return _jspx_dependants;
26    }
27  
28    public void _jspService(HttpServletRequest request, HttpServletResponse response)
29          throws java.io.IOException, ServletException {
30  
31      PageContext pageContext = null;
32      HttpSession session = null;
33      ServletContext application = null;
34      ServletConfig config = null;
35      JspWriter out = null;
36      Object page = this;
37      JspWriter _jspx_out = null;
38      PageContext _jspx_page_context = null;
39  
40      try {
41        response.setContentType("text/html;charset=UTF-8");
42        pageContext = _jspxFactory.getPageContext(this, request, response,
43        			null, true, 8192, true);
44        _jspx_page_context = pageContext;
45        application = pageContext.getServletContext();
46        config = pageContext.getServletConfig();
47        session = pageContext.getSession();
48        out = pageContext.getOut();
49        _jspx_out = out;
50        _jspx_resourceInjector = (org.apache.jasper.runtime.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector");
51  
52        out.write('\n');
53        out.write('\n');
54  
55    HMaster master = (HMaster)getServletContext().getAttribute(HMaster.MASTER);
56    Configuration conf = master.getConfiguration();
57  
58        out.write("\n<!--[if IE]>\n<!DOCTYPE html>\n<![endif]-->\n<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\">\n    <title>HBase Master: ");
59        out.print( master.getServerName() );
60        out.write("</title>\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <meta name=\"description\" content=\"\">\n    <meta name=\"author\" content=\"\">\n\n\n      <link href=\"/static/css/bootstrap.min.css\" rel=\"stylesheet\">\n      <link href=\"/static/css/bootstrap-theme.min.css\" rel=\"stylesheet\">\n      <link href=\"/static/css/hbase.css\" rel=\"stylesheet\">\n  </head>\n\n  <body>\n\n  <div class=\"navbar  navbar-fixed-top navbar-default\">\n      <div class=\"container-fluid\">\n          <div class=\"navbar-header\">\n              <button type=\"button\" class=\"navbar-toggle\" data-toggle=\"collapse\" data-target=\".navbar-collapse\">\n                  <span class=\"icon-bar\"></span>\n                  <span class=\"icon-bar\"></span>\n                  <span class=\"icon-bar\"></span>\n              </button>\n              <a class=\"navbar-brand\" href=\"/master-status\"><img src=\"/static/hbase_logo_small.png\" alt=\"HBase Logo\"/></a>\n          </div>\n          <div class=\"collapse navbar-collapse\">\n              <ul class=\"nav navbar-nav\">\n");
61        out.write("                  <li class=\"active\"><a href=\"/master-status\">Home</a></li>\n                  <li><a href=\"/tablesDetailed.jsp\">Table Details</a></li>\n                  <li><a href=\"/procedures.jsp\">Procedures</a></li>\n                  <li><a href=\"/logs/\">Local Logs</a></li>\n                  <li><a href=\"/logLevel\">Log Level</a></li>\n                  <li><a href=\"/dump\">Debug Dump</a></li>\n                  <li><a href=\"/jmx\">Metrics Dump</a></li>\n                  ");
62   if (HBaseConfiguration.isShowConfInServlet()) { 
63        out.write("\n                  <li><a href=\"/conf\">HBase Configuration</a></li>\n                  ");
64   } 
65        out.write("\n              </ul>\n          </div><!--/.nav-collapse -->\n      </div>\n  </div>\n\n  <div class=\"container-fluid content\">\n    <div class=\"row inner_header\">\n        <div class=\"page-header\">\n            <h1>User Tables</h1>\n        </div>\n    </div>\n\n");
66   HTableDescriptor[] tables;
67     Connection connection = master.getConnection();
68     Admin admin = connection.getAdmin();
69     try {
70       tables = admin.listTables();
71     } finally {
72       admin.close();
73     }
74     if(tables != null && tables.length > 0) { 
75        out.write("\n<table class=\"table table-striped\">\n<tr>\n    <th>Table</th>\n    <th>Description</th>\n</tr>\n");
76     for(HTableDescriptor htDesc : tables ) { 
77        out.write("\n<tr>\n    <td><a href=\"/table.jsp?name=");
78        out.print( escapeXml(htDesc.getTableName().getNameAsString()) );
79        out.write('"');
80        out.write('>');
81        out.print( escapeXml(htDesc.getTableName().getNameAsString()) );
82        out.write("</a></td>\n    <td>");
83        out.print( htDesc.toString() );
84        out.write("</td>\n</tr>\n");
85     }  
86        out.write("\n\n<p> ");
87        out.print( tables.length );
88        out.write(" table(s) in set.</p>\n</table>\n");
89   } 
90        out.write("\n</div>\n<script src=\"/static/js/jquery.min.js\" type=\"text/javascript\"></script>\n<script src=\"/static/js/bootstrap.min.js\" type=\"text/javascript\"></script>\n\n</body>\n</html>\n");
91      } catch (Throwable t) {
92        if (!(t instanceof SkipPageException)){
93          out = _jspx_out;
94          if (out != null && out.getBufferSize() != 0)
95            out.clearBuffer();
96          if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
97        }
98      } finally {
99        _jspxFactory.releasePageContext(_jspx_page_context);
100     }
101   }
102 }