View Javadoc

1   package org.apache.hadoop.hbase.generated.rest;
2   
3   import javax.servlet.*;
4   import javax.servlet.http.*;
5   import javax.servlet.jsp.*;
6   import org.apache.hadoop.conf.Configuration;
7   import org.apache.hadoop.hbase.HBaseConfiguration;
8   import org.apache.hadoop.hbase.util.VersionInfo;
9   import java.util.Date;
10  
11  public final class rest_jsp extends org.apache.jasper.runtime.HttpJspBase
12      implements org.apache.jasper.runtime.JspSourceDependent {
13  
14    private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory();
15  
16    private static java.util.Vector _jspx_dependants;
17  
18    private org.apache.jasper.runtime.ResourceInjector _jspx_resourceInjector;
19  
20    public Object getDependants() {
21      return _jspx_dependants;
22    }
23  
24    public void _jspService(HttpServletRequest request, HttpServletResponse response)
25          throws java.io.IOException, ServletException {
26  
27      PageContext pageContext = null;
28      HttpSession session = null;
29      ServletContext application = null;
30      ServletConfig config = null;
31      JspWriter out = null;
32      Object page = this;
33      JspWriter _jspx_out = null;
34      PageContext _jspx_page_context = null;
35  
36      try {
37        response.setContentType("text/html;charset=UTF-8");
38        pageContext = _jspxFactory.getPageContext(this, request, response,
39        			null, true, 8192, true);
40        _jspx_page_context = pageContext;
41        application = pageContext.getServletContext();
42        config = pageContext.getServletConfig();
43        session = pageContext.getSession();
44        out = pageContext.getOut();
45        _jspx_out = out;
46        _jspx_resourceInjector = (org.apache.jasper.runtime.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector");
47  
48        out.write('\n');
49        out.write('\n');
50  
51  Configuration conf = (Configuration)getServletContext().getAttribute("hbase.conf");
52  long startcode = conf.getLong("startcode", System.currentTimeMillis());
53  String listenPort = conf.get("hbase.rest.port", "8080");
54  
55        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 REST Server: ");
56        out.print( listenPort );
57        out.write("</title>\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <meta name=\"description\" content=\"\">\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  <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=\"/rest.jsp\"><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                  <li class=\"active\"><a href=\"/rest.jsp\">Home</a></li>\n");
58        out.write("                  <li><a href=\"/logs/\">Local logs</a></li>\n                  <li><a href=\"/logLevel\">Log Level</a></li>\n                  <li><a href=\"/jmx\">Metrics Dump</a></li>\n                  ");
59   if (HBaseConfiguration.isShowConfInServlet()) { 
60        out.write("\n                  <li><a href=\"/conf\">HBase Configuration</a></li>\n                  ");
61   } 
62        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>RESTServer <small>");
63        out.print( listenPort );
64        out.write("</small></h1>\n        </div>\n    </div>\n    <div class=\"row\">\n\n    <section>\n    <h2>Software Attributes</h2>\n    <table id=\"attributes_table\" class=\"table table-striped\">\n        <tr>\n            <th>Attribute Name</th>\n            <th>Value</th>\n            <th>Description</th>\n        </tr>\n        <tr>\n            <td>HBase Version</td>\n            <td>");
65        out.print( VersionInfo.getVersion() );
66        out.write(", revision=");
67        out.print( VersionInfo.getRevision() );
68        out.write("</td>\n            <td>HBase version and revision</td>\n        </tr>\n        <tr>\n            <td>HBase Compiled</td>\n            <td>");
69        out.print( VersionInfo.getDate() );
70        out.write(',');
71        out.write(' ');
72        out.print( VersionInfo.getUser() );
73        out.write("</td>\n            <td>When HBase version was compiled and by whom</td>\n        </tr>\n        <tr>\n            <td>REST Server Start Time</td>\n            <td>");
74        out.print( new Date(startcode) );
75        out.write("</td>\n            <td>Date stamp of when this REST server was started</td>\n        </tr>\n    </table>\n    </section>\n    </div>\n    <div class=\"row\">\n\n    <section>\n<a href=\"http://hbase.apache.org/book.html#_rest\">Apache HBase documentation about REST</a>\n    </section>\n    </div>\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<script src=\"/static/js/tab.js\" type=\"text/javascript\"></script>\n</body>\n</html>\n\n");
76      } catch (Throwable t) {
77        if (!(t instanceof SkipPageException)){
78          out = _jspx_out;
79          if (out != null && out.getBufferSize() != 0)
80            out.clearBuffer();
81          if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
82        }
83      } finally {
84        _jspxFactory.releasePageContext(_jspx_page_context);
85      }
86    }
87  }